/* =====================================================
   K PLUS Mobile — Shared CSS
   Theme: macOS Light Mode
   Logo Palette: Lavender #A8B8D8 · Mauve #C4AECE · Peach #F4956A
===================================================== */

/* ── Design Tokens ── */
:root {
  /* ── Accent (primary — Logo Lavender) */
  --accent:       #A8B8D8;
  --accent-rgb:   168, 184, 216;
  --accent-light: #C4D0E8;
  --accent-dark:  #8A9EC0;

  /* ── Secondary (Logo Peach) */
  --secondary:     #F4956A;
  --secondary-rgb: 244, 149, 106;
  --secondary-dim: #E07B50;

  /* ── Mauve (mid-stop) */
  --mauve:         #C4AECE;
  --mauve-rgb:     196, 174, 206;

  /* ── Backward-compat aliases → logo palette */
  --coral:         #F4956A;
  --coral-rgb:     244, 149, 106;
  --gold:          #C4AECE;
  --gold-rgb:      196, 174, 206;
  --gold-bright:   #D4BEDE;
  --gold-dark:     #B09ABE;
  --blue:          #A8B8D8;
  --blue-rgb:      168, 184, 216;
  --blue-gray:     #6E6E73;
  --blue-gray-rgb: 110, 110, 115;
  --blue-dark:     #8A9EC0;
  --green:         #34C759;

  /* ── Status — Apple system colors */
  --success:     #34C759;
  --success-rgb: 52, 199, 89;
  --danger:      #FF3B30;
  --danger-rgb:  255, 59, 48;
  --warning:     #FF9500;
  --info:        #32ADE6;

  /* ── Surface */
  --bg:    #F2F2F7;
  --panel: #FFFFFF;
  --r:     20px;
  --t:     .4s cubic-bezier(.23, 1, .32, 1);

  /* ── Glass — frosted white (macOS vibrancy) */
  --glass-bg:       rgba(255, 255, 255, 0.78);
  --glass-bg-hover: rgba(255, 255, 255, 0.92);
  --glass-border:   rgba(0, 0, 0, 0.08);
  --glass-blur:     blur(20px) saturate(1.8);
  --glass-shadow:   0 2px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
  --glass-shadow-h: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,1);
  --glass-inner:    inset 0 0 0 1px rgba(255,255,255,0.5);

  /* ── Gradient — Logo Lavender → Mauve → Peach */
  --gradient-primary:     linear-gradient(90deg,  #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);
  --gradient-primary-135: linear-gradient(135deg, #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);

  /* ── Text — Apple label colors */
  --text:        #1D1D1F;
  --body:        #3C3C43;
  --muted:       #6E6E73;
  --border-soft: rgba(0, 0, 0, 0.1);

  /* ── Layout */
  --ticker-h: 0px;
  --nav-h:    44px;
  --header-h: var(--nav-h);
}

/* ── Gradient text utility */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--body);
  font-family: 'Rajdhani', sans-serif;
  background: #F2F2F7;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(var(--accent-rgb), .15); color: var(--text); }

/* ── Background layers */
.cyber-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.cyber-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(0,122,255,.06)  0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 85%, rgba(175,82,222,.05) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(52,199,89,.03)  0%, transparent 70%);
  animation: bgBreath 10s ease-in-out infinite alternate;
}
@keyframes bgBreath { from { opacity: .5; } to { opacity: 1; } }

.blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(110px);
  animation: blobFloat 22s ease-in-out infinite alternate;
}
.blob:nth-child(1) { width: 600px; height: 600px; background: #A8B8D8; top: -15%; left: -10%; animation-duration: 22s; opacity: .09; }
.blob:nth-child(2) { width: 500px; height: 500px; background: #C4AECE; bottom: -15%; right: -8%;  animation-duration: 28s; animation-delay: -5s; opacity: .08; }
.blob:nth-child(3) { width: 350px; height: 350px; background: #F4956A; top: 50%;  left: 55%;  animation-duration: 18s; animation-delay: -9s; opacity: .06; }
@keyframes blobFloat {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(40px,-30px) scale(1.06); }
  66%  { transform: translate(-20px,40px) scale(.94); }
  100% { transform: translate(30px,20px) scale(1.03); }
}

/* ── Glass panels — macOS frosted glass */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: var(--t);
}
.glass::before,
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.glass::before {
  background: linear-gradient(145deg,
    rgba(255,255,255,0.6) 0%,
    rgba(255,255,255,0.1) 40%,
    transparent 100%);
}
.glass::after {
  background: linear-gradient(180deg,
    transparent 60%,
    rgba(0,0,0,0.02) 100%);
}
.glass:hover {
  border-color: rgba(0, 0, 0, 0.12);
  background: var(--glass-bg-hover);
  box-shadow: var(--glass-shadow-h);
  transform: translateY(-6px) scale(1.005);
}

/* Corner accents — subtle macOS style */
.ca { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.ca-tl { top: -1px; left: -1px;   border-top:    1.5px solid rgba(var(--accent-rgb),0.35);    border-left:  1.5px solid rgba(var(--accent-rgb),0.35);    border-radius: 3px 0 0 0; }
.ca-tr { top: -1px; right: -1px;  border-top:    1.5px solid rgba(var(--secondary-rgb),0.3); border-right: 1.5px solid rgba(var(--secondary-rgb),0.3); border-radius: 0 3px 0 0; }
.ca-bl { bottom: -1px; left: -1px;  border-bottom: 1.5px solid rgba(var(--secondary-rgb),0.3); border-left:  1.5px solid rgba(var(--secondary-rgb),0.3); border-radius: 0 0 0 3px; }
.ca-br { bottom: -1px; right: -1px; border-bottom: 1.5px solid rgba(var(--accent-rgb),0.35);    border-right: 1.5px solid rgba(var(--accent-rgb),0.35);    border-radius: 0 0 3px 0; }

/* ── Form inputs — macOS style */
.cyber-input {
  width: 100%;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: .95rem;
  padding: .65rem 1rem;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.cyber-input:focus {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15), inset 0 1px 3px rgba(0,0,0,0.05);
  background: #FFFFFF;
}
.cyber-input::placeholder { color: rgba(110,110,115,0.6); }
textarea.cyber-input { resize: vertical; min-height: 120px; }

select.cyber-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23007AFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.2rem;
  cursor: pointer;
}
select.cyber-input option { background: #FFFFFF; color: #1D1D1F; padding: .4rem .8rem; }

/* ── Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(var(--accent-rgb), .08);
  border: 1px solid rgba(var(--accent-rgb), .35);
  color: var(--accent);
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .7rem 1.4rem;
  width: 100%;
  cursor: pointer;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover:not(:disabled) {
  background: rgba(var(--accent-rgb), .15);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), .25);
  transform: translateY(-2px);
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-danger {
  background: rgba(var(--danger-rgb), .06);
  border: 1px solid rgba(var(--danger-rgb), .25);
  color: var(--danger);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: all .28s;
  white-space: nowrap;
}
.btn-danger:hover { background: rgba(var(--danger-rgb), .12); box-shadow: 0 2px 10px rgba(var(--danger-rgb), .2); }

.btn-edit {
  background: rgba(var(--secondary-rgb), .06);
  border: 1px solid rgba(var(--secondary-rgb), .25);
  color: var(--secondary);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: all .28s;
  white-space: nowrap;
}
.btn-edit:hover { background: rgba(var(--secondary-rgb), .12); box-shadow: 0 2px 10px rgba(var(--secondary-rgb), .2); }

.btn-cancel {
  background: rgba(138, 154, 176, .06);
  border: 1px solid rgba(138, 154, 176, .2);
  color: var(--muted);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: all .28s;
  width: 100%;
}
.btn-cancel:hover { background: rgba(138, 154, 176, .12); color: var(--body); }

/* ── Post link button — macOS glass pill + logo gradient ── */
.post-link-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0;
  padding: 7px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Share Tech Mono', 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  /* Gradient text via background-clip */
  background: linear-gradient(135deg, #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border: 1px solid rgba(168, 184, 216, 0.35);
  box-shadow: 0 2px 10px rgba(168, 184, 216, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: border-color .3s, box-shadow .3s, transform .2s cubic-bezier(.23,1,.32,1);
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
}
/* Glass background layer — separate from text gradient */
.post-link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(168, 184, 216, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}
/* Arrow icon */
.post-link-btn::after {
  content: "↗";
  font-size: 10px;
  background: linear-gradient(135deg, #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: transform .25s;
  line-height: 1;
}
.post-link-btn span {
  font-size: 10px; font-weight: 700; letter-spacing: .13em;
  background: linear-gradient(135deg, #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.post-link-btn:hover {
  border-color: rgba(196, 174, 206, 0.55);
  box-shadow: 0 4px 20px rgba(168, 184, 216, 0.2),
              0 0 0 1px rgba(196, 174, 206, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}
.post-link-btn:hover::after { transform: translate(2px, -2px); }
.post-link-btn:active { transform: translateY(0) scale(.97); }

/* Dark theme override */
[data-theme="cyber"] .post-link-btn::before {
  background: rgba(168, 184, 216, 0.08);
}
[data-theme="cyber"] .post-link-btn {
  border-color: rgba(168, 184, 216, 0.22);
  box-shadow: 0 2px 12px rgba(168, 184, 216, 0.07),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}


@keyframes plb-rotate {
  0%  { transform: rotate(0deg)  translate3d(0,0,0); }
  25% { transform: rotate(3deg)  translate3d(0,0,0); }
  50% { transform: rotate(-3deg) translate3d(0,0,0); }
  75% { transform: rotate(1deg)  translate3d(0,0,0); }
  100%{ transform: rotate(0deg)  translate3d(0,0,0); }
}
@keyframes plb-storm {
  0%  { transform: translate3d(0,0,0)    translateZ(0); }
  25% { transform: translate3d(4px,0,0)  translateZ(0); }
  50% { transform: translate3d(-3px,0,0) translateZ(0); }
  75% { transform: translate3d(2px,0,0)  translateZ(0); }
  100%{ transform: translate3d(0,0,0)    translateZ(0); }
}

/* ── Status messages */
.status-success, .status-error {
  padding: .7rem 1rem;
  border-radius: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem;
  letter-spacing: .06em;
}
.status-success { background: rgba(var(--success-rgb), .06); border: 1px solid rgba(var(--success-rgb), .22); color: var(--success); }
.status-error   { background: rgba(var(--danger-rgb),  .06); border: 1px solid rgba(var(--danger-rgb),  .22); color: var(--danger);  }

/* ── Image slots */
.img-slot {
  border: 2px dashed rgba(var(--accent-rgb), .2);
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden; transition: all .3s;
  background: rgba(var(--accent-rgb), .02);
}
.img-slot:hover { border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .05); }
.img-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.slot-rm {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(var(--danger-rgb), .4);
  color: var(--danger);
  border-radius: 50%; width: 22px; height: 22px; font-size: .65rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transition: all .2s;
}
.slot-rm:hover { background: rgba(var(--danger-rgb), .18); border-color: var(--danger); }

/* ── Progress */
.progress-track { height: 5px; background: rgba(var(--accent-rgb), .08); border-radius: 999px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--gradient-primary); border-radius: 999px; transition: width .25s ease; box-shadow: 0 0 8px rgba(var(--accent-rgb), .4); width: 0%; }

/* ── Spinner */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(var(--accent-rgb), .15); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Post list items */
.post-item {
  border: 1px solid rgba(var(--secondary-rgb), .12);
  border-radius: 12px; padding: .9rem 1rem;
  background: rgba(var(--secondary-rgb), .03);
  transition: border-color .3s, background .3s;
  display: flex; align-items: flex-start; gap: .9rem;
}
.post-item:hover { border-color: rgba(var(--accent-rgb), .25); background: rgba(var(--accent-rgb), .03); }

/* ── Stat cards — macOS style */
.stat-card {
  background: rgba(255,255,255,0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px; padding: 1rem 1.25rem;
  transition: all .35s cubic-bezier(.23,1,.32,1); position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-card:hover { border-color: rgba(var(--accent-rgb),0.25); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.stat-card .stat-label { font-family: 'Share Tech Mono', monospace; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1.5rem; color: var(--text); line-height: 1.2; }
.stat-card .stat-sub { font-family: 'Rajdhani', sans-serif; font-size: .7rem; color: var(--muted); margin-top: 2px; }

/* ── Chart boxes — macOS style */
.chart-box {
  background: rgba(255,255,255,0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px; padding: 1.25rem; position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.chart-box canvas { max-height: 220px; max-width: 100%; }

/* ── Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.reveal.vis { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }

/* ── Scrollbar — macOS style */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }

/* ── Carousel — macOS style */
.carousel { position: relative; height: 200px; overflow: hidden; touch-action: pan-y; }
.car-track { display: flex; height: 100%; transition: transform .4s cubic-bezier(.23,1,.32,1); }
.car-slide { min-width: 100%; height: 100%; position: relative; flex-shrink: 0; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.82); border: 1px solid rgba(0,0,0,0.1);
  color: var(--accent); width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center;
  transition: all .2s; backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.car-btn:hover { background: #FFFFFF; border-color: rgba(var(--accent-rgb),0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.car-prev { left: 8px; } .car-next { right: 8px; }
.car-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 10; }
.car-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background .3s, transform .3s; }
.car-dot.active { background: var(--accent); transform: scale(1.3); }

@keyframes gPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* ── Post detail overlay — macOS sheet style */
#detail-view { display: none; position: fixed; inset: 0; z-index: 999; overflow-y: auto; background: rgba(242,242,247,0.92); backdrop-filter: blur(28px) saturate(1.8); -webkit-backdrop-filter: blur(28px) saturate(1.8); }
#detail-view.open { display: block; animation: fadeIn .3s ease; }
body.detail-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
#detail-wrap { position: relative; padding-left: 48px; }
#detail-back {
  position: absolute; top: 24px; left: 0;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.9); backdrop-filter: blur(16px);
  color: var(--accent); cursor: pointer; transition: all .3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#detail-back:hover { border-color: rgba(var(--accent-rgb),0.3); transform: translateX(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
#detail-images { display: flex; gap: 1rem; flex-wrap: wrap; }
#detail-images img { flex: 1 1 300px; max-height: 400px; object-fit: cover; border-radius: 12px; }
#detail-content { white-space: pre-line; font-size: 1rem; line-height: 1.7; color: var(--body); }

/* ── Shared utilities */
.nav-panel { background: rgba(255,255,255,0.88); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 1px 0 rgba(0,0,0,0.1), 0 2px 20px rgba(0,0,0,0.06); }
.glass-button { background: rgba(255,255,255,0.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.glass-pill   { background: rgba(255,255,255,0.7);  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.logo-glow    { filter: drop-shadow(0 0 6px  rgba(var(--accent-rgb), .55)); }
.logo-glow-sm { filter: drop-shadow(0 0 5px  rgba(var(--accent-rgb), .55)); }
.logo-glow-lg { filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), .6));  }
.pulse-dot { display: inline-block; border-radius: 999px; background: var(--success); box-shadow: 0 0 6px var(--success); animation: gPulse 2s ease-in-out infinite; }
.external-link {
  background: linear-gradient(135deg, #A8B8D8 0%, #C4AECE 50%, #F4956A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(196,174,206,.5);
  word-break: break-all;
}

/* ── Image protection */
.car-slide img, #detail-images img, #posts-grid img, .post-img-wrap img, .img-slot img {
  -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.car-slide, .post-img-wrap, #detail-images, .img-slot { pointer-events: auto; }


/* ═══════════════════════════════════════════
   SHARE BUTTON — Glass (matches feed / nav UI)
═══════════════════════════════════════════ */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--glass-bg);
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
  font-size: .56rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  opacity: .88;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition:
    color .25s ease,
    border-color .25s ease,
    background .25s ease,
    box-shadow .3s cubic-bezier(.23,1,.32,1),
    transform .3s cubic-bezier(.23,1,.32,1),
    opacity .25s ease;
}

.share-btn:hover {
  opacity: 1;
  background: rgba(var(--accent-rgb), .06);
  border-color: rgba(var(--accent-rgb), .45);
  box-shadow:
    0 4px 16px rgba(var(--accent-rgb), .12),
    inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(-1px);
  color: var(--accent-light);
}

/* Icon */
.share-btn .share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.23,1,.32,1);
}
.share-btn:hover .share-icon { transform: scale(1.08); }
.share-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Label */
.share-label {
  display: inline-block;
  transition: letter-spacing .2s ease;
}
.share-btn:hover .share-label { letter-spacing: .18em; }

/* ── Copied state ── */
.share-btn.copied {
  opacity: 1;
  border-color: rgba(var(--success-rgb), .45);
  background: rgba(var(--success-rgb), .08);
  color: var(--success);
  box-shadow:
    0 0 0 1px rgba(var(--success-rgb), .12),
    0 4px 14px rgba(var(--success-rgb), .18),
    inset 0 1px 0 rgba(255,255,255,.04);
  animation: sharePop .35s cubic-bezier(.23,1,.32,1) both;
}
.share-btn.copied:hover {
  border-color: rgba(var(--success-rgb), .55);
  background: rgba(var(--success-rgb), .1);
  color: var(--success);
  transform: translateY(-1px);
}
.share-btn.copied .share-icon { transform: scale(1.05); }

@keyframes sharePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06) translateY(-2px); }
  100% { transform: scale(1)   translateY(-1px); }
}

/* ═══════════════════════════════════════════
   SHARE TOAST — Premium Notification
═══════════════════════════════════════════ */
#share-toast {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(24px) scale(.94);
  z-index: 9999;
  pointer-events: none;

  /* macOS-style notification pill */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: .55rem 1.5rem .55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0,0,0,0.1);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.14),
    0 2px 8px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,1);
  white-space: nowrap;

  /* Text */
  color: var(--body);
  font-family: 'Share Tech Mono', monospace;
  font-size: .7rem;
  letter-spacing: .14em;

  opacity: 0;
  transition:
    opacity .3s cubic-bezier(.23,1,.32,1),
    transform .38s cubic-bezier(.23,1,.32,1);
}

#share-toast.show {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Animated green check icon */
.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(22,163,74, .15);
  border: 1px solid rgba(22,163,74, .35);
  flex-shrink: 0;
  animation: toastIconIn .4s cubic-bezier(.23,1,.32,1) both;
}
.toast-icon svg {
  width: 11px; height: 11px;
  stroke: #22c55e;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: toastCheck .4s .1s cubic-bezier(.23,1,.32,1) forwards;
}
@keyframes toastIconIn {
  from { transform: scale(.4) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1)  rotate(0deg);   opacity: 1; }
}
@keyframes toastCheck {
  to { stroke-dashoffset: 0; }
}

/* Gradient label */
.toast-label {
  background: linear-gradient(90deg, var(--accent) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 600;
}
