/* Flashiibo Pro Interactive Experience — End-User Styles */
.fp-emu-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  margin-bottom: 2.5rem;
}

/* Hide default Minima page title so our clean header leads */
.post-header:has(+ .post-content .fp-emu-page),
article.post:has(.fp-emu-page) > .post-header {
  display: none;
}

.fp-emu-breadcrumb {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.9rem;
}

.fp-emu-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.fp-emu-breadcrumb a:hover {
  text-decoration: underline;
}

.fp-emu-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e295b 60%, #172554 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 1.65rem 1.9rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fp-emu-hero-copy {
  max-width: 680px;
}

.fp-emu-hero h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem 0;
  color: #ffffff;
}

.fp-emu-hero p {
  font-size: 1rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.fp-emu-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #e0f2fe;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.fp-emu-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.fp-emu-status-dot.is-ready {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

/* Main 2-column Studio Layout */
.fp-emu-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.fp-emu-stage-col {
  position: sticky;
  top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Physical Flashiibo Pro Handheld Shell */
.fp-emu-device-wrap {
  position: relative;
  width: 100%;
  max-width: 372px;
  padding: 0 8px;
  box-sizing: border-box;
  outline: none;
}

/* Subtle left-side wake/reset button bump matching real unit */
.fp-emu-side-btn {
  position: absolute;
  left: 2px;
  top: 56%;
  width: 7px;
  height: 36px;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  border: 1px solid #94a3b8;
  border-right: none;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
}

.fp-emu-side-btn:hover {
  background: #e2e8f0;
}

.fp-emu-side-btn:active {
  transform: translateX(2px);
}

.fp-emu-shell {
  background: linear-gradient(165deg, #ffffff 0%, #f5f7fa 52%, #e6ebf2 100%);
  border-radius: 44px;
  padding: 22px 22px 26px 22px;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.18),
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -4px 10px rgba(148, 163, 184, 0.35);
  border: 1px solid #d5dde8;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* Recessed Faceplate Window around Logo + OLED */
.fp-emu-faceplate {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-radius: 26px;
  padding: 12px 14px 16px 14px;
  border: 1px solid #cfd8e3;
  box-shadow:
    inset 0 2px 5px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.fp-emu-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
}

.fp-emu-brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.fp-emu-brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
}

/* Subtle blue status indicator light */
.fp-emu-led {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 1px solid #94a3b8;
  transition: background 0.08s ease, box-shadow 0.08s ease;
}

.fp-emu-led.is-lit {
  background: #38bdf8;
  border-color: #0284c7;
  box-shadow: 0 0 10px 2px rgba(56, 189, 248, 0.85);
}

/* OLED Bezel & Crisp 128x64 Screen */
.fp-emu-screen-bezel {
  background: #060911;
  border-radius: 10px;
  padding: 10px;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.fp-emu-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  height: auto;
  background: #060911;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 3px;
}

.fp-emu-screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 17, 0.88);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 0.55rem;
  transition: opacity 0.2s ease;
}

.fp-emu-screen-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.fp-emu-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(148, 163, 184, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: fp-emu-spin 0.75s linear infinite;
}

@keyframes fp-emu-spin {
  to { transform: rotate(360deg); }
}

/* 4-Button Tactile Diamond Cross Layout */
.fp-emu-dpad {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  grid-template-rows: repeat(3, 62px);
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  margin: 4px auto 2px auto;
}

.fp-emu-btn {
  position: relative;
  width: 74px;
  height: 70px;
  border-radius: 18px;
  border: 1.5px solid #bcc7d6;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow:
    0 5px 10px rgba(15, 23, 42, 0.12),
    0 2px 3px rgba(15, 23, 42, 0.08),
    inset 0 2px 1px rgba(255, 255, 255, 0.95);
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.07s ease, box-shadow 0.07s ease, border-color 0.12s ease, background 0.12s ease;
}

.fp-emu-btn[data-btn="UP"] {
  grid-column: 2;
  grid-row: 1;
}

.fp-emu-btn[data-btn="BACK"] {
  grid-column: 1;
  grid-row: 2;
}

.fp-emu-btn[data-btn="OK"] {
  grid-column: 3;
  grid-row: 2;
}

.fp-emu-btn[data-btn="DOWN"] {
  grid-column: 2;
  grid-row: 3;
}

.fp-emu-btn:hover {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.fp-emu-btn.is-pressed,
.fp-emu-btn:active {
  transform: translateY(3px) scale(0.97);
  background: linear-gradient(180deg, #e2e8f0 0%, #f1f5f9 100%);
  border-color: #3b82f6;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.16),
    inset 0 2px 4px rgba(15, 23, 42, 0.1);
}

/* Guided Walkthrough Button Highlight */
.fp-emu-btn.is-autopress {
  transform: translateY(3px) scale(0.97);
  border-color: #2563eb;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  color: #1d4ed8;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.32),
    0 2px 6px rgba(37, 99, 235, 0.25);
}

.fp-emu-btn.is-autohold {
  transform: translateY(3px) scale(0.97);
  border-color: #d97706;
  background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
  color: #b45309;
  box-shadow:
    0 0 0 5px rgba(245, 158, 11, 0.38),
    0 2px 8px rgba(217, 119, 6, 0.3);
}

.fp-emu-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.fp-emu-btn-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #475569;
  pointer-events: none;
}

.fp-emu-btn.is-autopress .fp-emu-btn-label {
  color: #1d4ed8;
}

.fp-emu-btn.is-autohold .fp-emu-btn-label {
  color: #b45309;
}

/* 1-second Hold Progress Bar inside OK / BACK button */
.fp-emu-hold-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 5px;
  height: 3px;
  border-radius: 99px;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.fp-emu-hold-fill {
  width: 0%;
  height: 100%;
  background: #f59e0b;
  border-radius: 99px;
}

/* Bottom USB-C slot visual detail */
.fp-emu-usbc {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: #94a3b8;
  margin: 16px auto -14px auto;
  opacity: 0.55;
}

/* Stage Toolbar under Device */
.fp-emu-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 356px;
}

.fp-emu-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.fp-emu-tool-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.fp-emu-tool-btn:active {
  transform: translateY(1px);
}

.fp-emu-kbd-hint {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
  max-width: 340px;
}

.fp-emu-kbd-hint kbd {
  display: inline-block;
  padding: 0.08rem 0.38rem;
  font-size: 0.73rem;
  font-family: inherit;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  box-shadow: 0 1px 0 #cbd5e1;
}

/* Right Column: Guided Walkthroughs */
.fp-emu-scenarios-col {
  min-width: 0;
}

/* Live Walkthrough Coach Banner */
.fp-emu-coach {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 16px;
  padding: 1.05rem 1.2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.fp-emu-coach.is-done {
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
  border-color: #6ee7b7;
}

.fp-emu-coach-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.fp-emu-coach-step {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4ed8;
}

.fp-emu-coach.is-done .fp-emu-coach-step {
  color: #047857;
}

.fp-emu-coach-actions {
  display: flex;
  gap: 0.45rem;
}

.fp-emu-coach-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.fp-emu-coach-btn:hover {
  border-color: #60a5fa;
  color: #1d4ed8;
}

.fp-emu-coach-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.fp-emu-coach-desc {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.45;
  margin: 0;
}

.fp-emu-coach-progress {
  height: 5px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.fp-emu-coach.is-done .fp-emu-coach-progress {
  background: #d1fae5;
}

.fp-emu-coach-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.fp-emu-coach.is-done .fp-emu-coach-bar {
  background: #10b981;
}

.fp-emu-section-head {
  margin-bottom: 0.95rem;
}

.fp-emu-section-head h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.fp-emu-section-head p {
  font-size: 0.92rem;
  color: #475569;
  margin: 0;
}

/* Scenario Cards Grid */
.fp-emu-scenario-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.fp-emu-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.fp-emu-card:hover {
  border-color: #60a5fa;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.fp-emu-card.is-active {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.fp-emu-card:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.fp-emu-card-body {
  flex: 1;
  min-width: 0;
}

.fp-emu-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.fp-emu-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.fp-emu-card-badge {
  font-size: 0.71rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
}

.fp-emu-card-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.fp-emu-card-play {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  white-space: nowrap;
}

.fp-emu-card.is-active .fp-emu-card-play {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* Quick Controls Guide Strip below */
.fp-emu-tips-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.fp-emu-tip-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.fp-emu-tip-box strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.fp-emu-tip-box span {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
  display: block;
}

.fp-emu-links-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

@media screen and (max-width: 860px) {
  .fp-emu-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .fp-emu-stage-col {
    position: static;
  }

  .fp-emu-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 540px) {
  .fp-emu-hero {
    padding: 1.3rem 1.2rem;
  }

  .fp-emu-hero h1 {
    font-size: 1.48rem;
  }

  .fp-emu-shell {
    padding: 18px 16px 22px 16px;
    border-radius: 36px;
  }

  .fp-emu-dpad {
    grid-template-columns: repeat(3, 68px);
    grid-template-rows: repeat(3, 58px);
  }

  .fp-emu-btn {
    width: 68px;
    height: 64px;
  }

  .fp-emu-kbd-hint {
    display: none;
  }

  .fp-emu-card {
    flex-direction: column;
    gap: 0.65rem;
  }

  .fp-emu-card-play {
    align-self: flex-start;
  }

  .fp-emu-tips-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
