/* ============================================================
   MAC OS X LOADING SCREEN
   ============================================================ */
#mac-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}

#mac-loader .mac-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 128px;
}

#mac-loader-logo {
  margin-bottom: 8px;
}

.mac-loader-logo svg {
  display: block;
  margin: 0 auto;
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 2px 12px rgb(0 0 0 / 30%));
}

.mac-loader-spinner {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.mac-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #d0d0d0;
  border-top: 4px solid #888;
  border-radius: 50%;
  animation: mac-spin 1.1s linear infinite;
  margin: 0 auto;
}

@keyframes mac-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mac-loader-text {
  color: #888;
  font-size: 15px;
  letter-spacing: 0.04em;
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, sans-serif;
  opacity: 0.85;
}

/* ============================================================
   SECTION UTILITY CLASSES FOR HOMEPAGE CONTENT
   ============================================================ */

.fd-center {
  text-align: center;
}

.fd-padded {
  padding:48px 20px;
}

.fd-emoji {
  font-size: 32px;
  margin-bottom:12px;
}

.fd-headline {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

/* Trash section specific */
.fd-trash {
  background: #f8f8f8;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 7%);
  padding: 32px 0 28px;
  margin-top: 18px;
}

.fd-trash-img {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  opacity: 0.85;
}

.fd-trash-headline {
  font-size: 18px;
  font-weight: 700;
  color: #1a2a3a;
  margin-bottom: 8px;
}

.fd-trash-verse {
  font-size:12px;
  color: #aaa;
  font-style: italic;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

.fd-trash-caption {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 20px;
}

.fd-trash-ref {
  font-style: normal;
  font-weight: 600;
  color: #8a9ab0;
  display: block;
  margin-top: 6px;
}

/* ============================================================
   SEMANTIC UTILITY CLASSES FOR SECTION CONTENT
   ============================================================ */

.fd-link {
  color: #48d;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.12s;
}

.fd-link:hover {
  color: #2060b0;
}

.fd-bold {
  font-weight: 600;
}

.fd-caption {
  font-size: 11px;
  line-height: 1.5;
}

.fd-muted {
  color: #888;
}

/* ============================================================
   BRAVEHEART SUMMIT 2026 — Phase 1 Homepage Shell
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ============================================================
   DESKTOP / WALLPAPER
   ─────────────────────────────────────────────────────────
   To swap wallpaper, replace the background-image below:
     background-image: url('assets/wallpaper/bg.jpg');
     background-size: cover;
     background-position: center center;
   ============================================================ */
#desktop {
  position: relative;
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden;

  /* Wallpaper — solid black placeholder.
     Replace with: background-image: url('assets/wallpaper/bg.jpg');
     background-size: cover; background-position: center center; */
  background-color: #000;
  background-image: url('images/wallpaper.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Wallpaper branding overlay — hidden for now */
#wallpaper-branding { display: none; }

/* ============================================================
   MENU BAR — faithful Mac OS X
   ============================================================ */
#menubar {
  position: relative; z-index: 200;
  width: 100%; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 4px;
  background: rgb(236 238 241 / 96%);
  border-bottom: 1px solid rgb(160 165 175 / 55%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 90%) inset;
  backdrop-filter: blur(10px);
}

#menubar-left {
  display: flex;
  align-items: center;
  flex: 1;
}

#menubar-right {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.mitem {
  height: 22px; line-height: 22px; padding: 0 7px;
  font-size: 13px; color: #1a1a1a; cursor: default;
  white-space: nowrap; border-radius: 3px;
  display: flex; align-items: center;
}

.mitem:hover {
  background: rgb(0 78 193 / 85%);
  color: #fff;
}

.mitem-apple {
  padding: 0 9px;
}

.mitem-apple a {
  padding-top: 4px;
}

.mitem-bold { font-weight: 600; }

.mstatus {
  height: 22px; padding: 0 4px;
  cursor: default; display: flex; align-items: center; border-radius: 3px; gap: 3px;
}

.mstatus:hover {
  background: rgb(0 78 193 / 85%);
  color: #fff;
}

#mbar-time {
  font-size: 12px;
  color: #111;
  padding: 0 5px;
  white-space: nowrap;
}

/* ============================================================
   DESKTOP ICONS — top right
   ============================================================ */
#desktop-area {
  position: relative;
  flex: 1;
  z-index: 1;
}

#desktop-icons {
  position: absolute; top: 16px; right: 14px;
  display: flex; flex-direction: column; gap: 6px; z-index: 10;
}

.dicon {
  display: flex; flex-direction: column; align-items: center;
  width: 72px; padding: 4px; border-radius: 5px; cursor: default;
}
.dicon:hover { background: rgb(80 130 230 / 22%); }

.dicon img {
  width: 48px; height: 48px; object-fit: contain; display: block;
  filter: drop-shadow(0 2px 5px rgb(0 0 0 / 55%));
}

.dicon-label {
  margin-top: 3px; font-size: 11px; color: #fff; text-align: center;
  text-shadow: 0 1px 3px rgb(0 0 0 / 90%), 0 0 6px rgb(0 0 0 / 70%); line-height: 1.3;
}

/* ============================================================
   DOCK — Mac OS X Tiger/Leopard faithful
   ─────────────────────────────────────────────────────────
   Key properties from reference:
   • Steel-blue/grey shelf color (~#8fa4b8)
   • Thin horizontal stripe lines across entire shelf
   • Shelf height is FIXED — does NOT grow on hover
   • Only the icon <img> grows on hover, shelf stays put
   • Subtle top highlight, bottom shadow
   • Separator is a thin vertical line
   ─────────────────────────────────────────────────────────
   ICON REPLACEMENT:
   PNG size: 256 × 256 px, transparent bg
   Default visible: 60 px | Hover max: 88 px
   To replace: change src= on any .dock-item img
     <img src="assets/icons/tickets.png" alt="Tickets">
   ============================================================ */

#dock-wrap {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: center; align-items: flex-end;
  pointer-events: none;
}

#dock {
  pointer-events: all;
  position: relative;
  display: flex;
  align-items: flex-end;

  /* Fixed shelf — padding sets visible height, never changes */
  padding: 6px 14px;

  /* ── SHELF COLOR: light blue-grey, close to reference ── */

  /* Reference is ~#b8c8d6 — light, almost silvery-blue */
  background-color: #b2c2d2;

  /* Horizontal stripe lines — subtle, 2px repeat */
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgb(255 255 255 / 0%) 0,
      rgb(255 255 255 / 0%) 1px,
      rgb(255 255 255 / 18%) 1px,
      rgb(255 255 255 / 18%) 2px,
      rgb(0 0 0 / 3%)       2px,
      rgb(0 0 0 / 3%)       3px
    ),
    linear-gradient(
      to bottom,
      rgb(255 255 255 / 22%) 0%,
      rgb(255 255 255 / 6%) 45%,
      rgb(0 0 0 / 4%)       100%
    );

  /* Top white highlight line, no other borders */
  border-top: 1px solid rgb(255 255 255 / 75%);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;

  /* Thin shadow line above shelf, no glow */
  box-shadow:
    0 -1px 0 rgb(80 100 120 / 35%),
    0 -3px 10px rgb(0 0 0 / 22%);
  flex-shrink: 0;
}

/* Dock separator — thin vertical line, same as reference */
.dock-sep {
  width: 1px;
  height: 48px;
  margin: 0 5px 6px;
  flex-shrink: 0;
  align-self: flex-end;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgb(80 100 120 / 55%) 15%,
    rgb(80 100 120 / 55%) 85%,
    transparent 100%
  );

  /* Right side lighter highlight for depth */
  box-shadow: 1px 0 0 rgb(255 255 255 / 22%);
}

/* Individual dock slot wrapper — DOES NOT CHANGE SIZE */
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  padding: 0 3px;

  /* No width/height changes here — only the img inside changes */
}

/* THE ICON IMAGE — only this element changes size on hover */
.dock-item img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
  margin-bottom: 0;
  transition: width 0.12s ease, height 0.12s ease;
  transform-origin: bottom center;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 38%)) drop-shadow(0 1px 2px rgb(0 0 0 / 20%));
}

/* Tooltip — Mac OS X dark rounded tooltip */
.dock-tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%; transform: translateX(-50%);
  background: rgb(26 26 30 / 88%);
  color: #fff; font-size: 12px; font-weight: 500;
  padding: 3px 10px 4px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.12s;
  box-shadow: 0 2px 8px rgb(0 0 0 / 40%);
  z-index: 200;
}

.dock-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgb(26 26 30 / 88%);
}
.dock-item:hover .dock-tip { opacity: 1; }


/* ============================================================
   MOBILE — iPhone-style home screen
   ============================================================ */
@media (width <= 767px) {
  /* Hide all desktop elements */
  #menubar,
  #desktop-icons,
  #dock-wrap { display: none !important; }

  /* Show mobile elements */
  #mob-statusbar { display: flex !important; }
  #mob-grid      { display: flex !important; }
  #mob-dock      { display: none !important; }
}

/* ── Status bar ── */
#mob-statusbar {
  display: none;
  position: absolute; top: 0; left: 0; right: 0;
  height: 44px; z-index: 200;
  align-items: center; justify-content: space-between;
  padding: 10px 20px 0;

  /* Safe area for notch phones */
  padding-top: max(10px, env(safe-area-inset-top));
}

.mob-time {
  font-size: 15px; font-weight: 600;
  color: rgb(255 255 255 / 88%);
  letter-spacing: 0.02em;
}

.mob-icons {
  display: flex; align-items: center; gap: 6px;
  color: rgb(255 255 255 / 80%);
}

/* ── App icon grid — iPhone-style, 4 columns ── */

/*
  MOBILE ICON REPLACEMENT:
  ─────────────────────────────────────────────
  Each .mob-app-icon contains an <img> pointing to:
    assets/icons/<name>.png
  Replace src= to swap icons.
  Recommended PNG: 256 × 256 px, transparent bg
  Displayed at: 60 × 60 px with rounded corners via CSS
  ─────────────────────────────────────────────
*/
#mob-grid {
  display: none;
  position: absolute;
  inset: 0 0 90px; /* space for dock */
  z-index: 10;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 80px; /* below status bar */
  overflow: hidden;
}

.mob-app-row {
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding: 0 12px;
  margin-bottom: 4px;
}

.mob-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex: 1;
  max-width: 25%; /* 4 per row */
  padding: 8px 4px;
  -webkit-tap-highlight-color: transparent;
}

/* The icon image container — clips to rounded square */
.mob-app-icon {
  width: 60px; height: 60px;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(0 0 0 / 45%);
  flex-shrink: 0;
  transition: transform 0.1s;

  /* Shine overlay via ::after */
  position: relative;
}

.mob-app-icon::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 13px;
  background: linear-gradient(160deg, rgb(255 255 255 / 18%) 0%, transparent 55%);
  pointer-events: none;
}
.mob-app:active .mob-app-icon { transform: scale(0.86); }

/* The actual PNG — fills the rounded container */
.mob-app-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.mob-app-label {
  font-size: 11px;
  color: rgb(255 255 255 / 90%);
  text-align: center;
  text-shadow: 0 1px 3px rgb(0 0 0 / 70%);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

/* ── Mobile dock — same Mac OS X striped shelf ── */

/*
  MOBILE DOCK ICON REPLACEMENT:
  Same rule as grid above — replace src= on each img:
    assets/icons/<name>.png  (256×256 px PNG)
  Displayed at 52 × 52 px
*/
#mob-dock {
  display: none;
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 50;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 7px 24px;
  padding-bottom: max(7px, env(safe-area-inset-bottom));

  /* Same striped shelf as desktop */
  background-color: #b2c2d2;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgb(255 255 255 / 0%) 0,
      rgb(255 255 255 / 0%) 1px,
      rgb(255 255 255 / 18%) 1px,
      rgb(255 255 255 / 18%) 2px,
      rgb(0 0 0 / 3%)       2px,
      rgb(0 0 0 / 3%)       3px
    ),
    linear-gradient(
      to bottom,
      rgb(255 255 255 / 22%) 0%,
      rgb(255 255 255 / 6%) 45%,
      rgb(0 0 0 / 4%)       100%
    );
  border-top: 1px solid rgb(255 255 255 / 75%);
  box-shadow: 0 -1px 0 rgb(80 100 120 / 35%), 0 -3px 10px rgb(0 0 0 / 18%);
}

.mob-dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mob-dock-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgb(0 0 0 / 38%);
  flex-shrink: 0;
  transition: transform 0.1s;
  position: relative;
}

.mob-dock-icon::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, rgb(255 255 255 / 15%) 0%, transparent 55%);
  pointer-events: none;
}
.mob-dock-item:active .mob-dock-icon { transform: scale(0.86); }

.mob-dock-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   FINDER WINDOW — Mac OS X faithful
   ============================================================ */

.finder-window {
  position: absolute;
  width: 740px;
  height: 500px;
  min-width: 420px;
  min-height: 280px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  z-index: 500;
  border-radius: 8px;
  box-shadow:
    0 20px 60px rgb(0 0 0 / 55%),
    0 4px 16px rgb(0 0 0 / 35%),
    0 0 0 1px rgb(0 0 0 / 40%);
  overflow: hidden;
}
.finder-window.active { display: flex; }

/* ── Title bar ── */
.fw-titlebar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: default;
  position: relative;

  /* Brushed metal gradient — reference accurate */
  background: linear-gradient(
    to bottom,
    #e8e8e8 0%,
    #d0d0d0 45%,
    #c0c0c0 46%,
    #ccc 100%
  );
  border-bottom: 1px solid #999;

  /* Subtle stripe texture */
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0, transparent 1px,
      rgb(255 255 255 / 6%) 1px, rgb(255 255 255 / 6%) 2px
    ),
    linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 45%, #c0c0c0 46%, #ccc 100%);
}
.fw-titlebar.dragging { cursor: grabbing; }

/* Traffic lights */
.fw-lights {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fw-btn {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / 18%);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.fw-btn:hover::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgb(0 0 0 / 25%);
}
.fw-close  { background: radial-gradient(circle at 40% 35%, #ff7a6e, #e0342a); }
.fw-min    { background: radial-gradient(circle at 40% 35%, #ffcc56, #e0a020); }
.fw-max    { background: radial-gradient(circle at 40% 35%, #74d86a, #2aa820); }

/* Window title */
.fw-title {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 600;
  color: #333;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgb(255 255 255 / 70%);
}

/* ── Toolbar ── */
.fw-toolbar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  background: linear-gradient(to bottom, #d8d8d8 0%, #c8c8c8 100%);
  border-bottom: 1px solid #aaa;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0, transparent 1px,
      rgb(255 255 255 / 7%) 1px, rgb(255 255 255 / 7%) 2px
    ),
    linear-gradient(to bottom, #d8d8d8 0%, #c8c8c8 100%);
}

.fw-nav-btn {
  width: 24px; height: 20px;
  background: linear-gradient(to bottom, #e0e0e0, #c8c8c8);
  border: 1px solid #999;
  border-radius: 4px;
  cursor: default;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #555;
  box-shadow: 0 1px 0 rgb(255 255 255 / 60%) inset;
}
.fw-nav-btn:hover { background: linear-gradient(to bottom, #e8e8e8, #d0d0d0); }

.fw-search {
  margin-left: auto;
  height: 20px; width: 140px;
  border: 1px solid #aaa;
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  font-size: 11px;
  color: #333;
  outline: none;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%) inset;
}

/* ── Body: sidebar + content ── */
.fw-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #fff;
}

/* Sidebar */
.fw-sidebar {
  width: 160px;
  flex-shrink: 0;
  background: linear-gradient(to right, #e8eaed, #dfe2e6);
  border-right: 1px solid #b8b8b8;
  overflow-y: auto;
  padding: 8px 0;
}
.fw-sidebar::-webkit-scrollbar { width: 6px; }

.fw-sidebar::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 20%);
  border-radius: 3px;
}

.fw-sidebar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 12px;
  color: #222;
  cursor: default;
  border-radius: 5px;
  margin: 0 4px;
}
.fw-sidebar-item:hover { background: rgb(0 0 0 / 6%); }

.fw-sidebar-item.selected {
  background: #3676d6;
  color: #fff;
}

.fw-sidebar-item img {
  width: 18px; height: 18px;
  object-fit: contain; flex-shrink: 0;

  /* Invert icon to white when selected */
}

.fw-sidebar-item.selected img { filter: brightness(10); }

/* Content area — document mode */
.fw-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: #fff;
}
.fw-content::-webkit-scrollbar { width: 8px; }

.fw-content::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 18%);
  border-radius: 4px;
}

/* ── Document typography ── */
.fd-doc {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, sans-serif;
}

.fd-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 8px;
}

.fd-h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.fd-lead {
  font-size: 13px;
  color: #444;
  line-height: 1.65;
  margin-bottom: 4px;
}

.fd-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 20px 0;
}

.fd-h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin: 20px 0 8px;
}

.fd-p {
  font-size: 12px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 10px;
}

.fd-p strong {
  color: #111;
  font-weight: 600;
}

/* Stats row */
.fd-stat-row {
  display: flex;
  gap: 0;
  margin-top: 24px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.fd-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-right: 1px solid #e8e8e8;
}
.fd-stat:last-child { border-right: none; }

.fd-stat-n {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  line-height: 1;
  margin-bottom: 4px;
}

.fd-stat-l {
  font-size: 10px;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Ticket cards */
.fd-ticket-card {
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
  background: #fafafa;
}

.fd-ticket-featured {
  border-color: #48d;
  background: #f0f6ff;
}

.fd-ticket-badge {
  position: absolute;
  top: -1px; right: 12px;
  background: #48d;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 0 0 5px 5px;
  letter-spacing: 0.05em;
}

.fd-ticket-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
  margin-bottom: 4px;
}

.fd-ticket-price {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1;
}

.fd-ticket-desc {
  font-size: 11px;
  color: #555;
  line-height: 1.55;
}

/* People list */
.fd-person-list { margin-bottom: 6px; }

.fd-person {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.fd-person:last-child { border-bottom: none; }

.fd-person-name {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.fd-person-role {
  font-size: 11px;
  color: #888;
}

/* FAQ */
.fd-faq-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.fd-faq-item:last-child { border-bottom: none; }

.fd-faq-q {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  margin-bottom: 5px;
}

.fd-faq-a {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}

/* Schedule */
.fd-schedule-list { margin-bottom: 8px; }

.fd-sched-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
}
.fd-sched-item:last-child { border-bottom: none; }

.fd-sched-time {
  font-size: 11px;
  font-weight: 600;
  color: #8a9ab0;
  width: 38px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.fd-sched-title {
  font-size: 12px;
  color: #222;
  line-height: 1.4;
}

/* Ticket buy button */
.fd-ticket-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 18px;
  border-radius: 12px;
  border: 1px solid #2060b0;
  background: linear-gradient(to bottom, #6eaaee 0%, #48d 40%, #26c 41%, #37d 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-shadow: 0 1px 1px rgb(0 0 80 / 35%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 40%) inset, 0 2px 5px rgb(0 60 150 / 30%);
  transition: filter 0.1s;
}
.fd-ticket-btn:hover { filter: brightness(1.1); }
.fd-ticket-btn:active { filter: brightness(0.9); }

@media (width <= 767px) {
  .fd-doc { padding: 20px 18px 32px; }
  .fd-h1  { font-size: 20px; }
  .fd-stat-row { flex-wrap: wrap; }

  .fd-stat {
    min-width: 50%;
    border-bottom: 1px solid #e8e8e8;
  }
}

/* ── Status bar ── */
.fw-statusbar {
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #555;
  background: linear-gradient(to bottom, #d0d0d0, #c4c4c4);
  border-top: 1px solid #aaa;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0, transparent 1px,
      rgb(255 255 255 / 7%) 1px, rgb(255 255 255 / 7%) 2px
    ),
    linear-gradient(to bottom, #d0d0d0, #c4c4c4);
}

/* Status bar only renders inside an active finder window — controlled via JS */

/* Resize handle */
.fw-resize {
  position: absolute;
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  cursor: nwse-resize;
  opacity: 0.4;
  background: linear-gradient(135deg,
    transparent 50%, #888 50%, #888 52%,
    transparent 52%, transparent 60%,
    #888 60%, #888 62%, transparent 62%,
    transparent 70%, #888 70%, #888 72%,
    transparent 72%);
}

/* ============================================================
   MOBILE BOTTOM SHEET
   ============================================================ */

/* Backdrop */
#bs-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgb(0 0 0 / 45%);
  z-index: 800;
  opacity: 0;
  transition: opacity 0.28s ease;
}
#bs-backdrop.visible { opacity: 1; }

/* Sheet container */
#bottom-sheet {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  height: 78vh;
  border-radius: 16px 16px 0 0;
  background: #f2f2f7;
  box-shadow: 0 -4px 32px rgb(0 0 0 / 30%);
  flex-direction: column;
  overflow: hidden;

  /* Start off-screen */
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: none;
}

#bottom-sheet.open {
  transform: translateY(0);
}

/* Handle bar */
#bs-handle-bar {
  flex-shrink: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

#bs-handle-bar::after {
  content: '';
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgb(0 0 0 / 22%);
}

/* Sheet header */
#bs-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 12px;
}

#bs-title {
  font-size: 17px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.3px;
}

#bs-done {
  font-size: 16px;
  font-weight: 600;
  color: #007aff;
  cursor: pointer;
  padding: 4px 0;
}

/* Sheet body: horizontal tabs on top, content below */
#bs-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Section tabs — horizontal scroll row */
#bs-tabs {
  flex-shrink: 0;
  display: flex;
  overflow-x: auto;
  padding: 0 14px 10px;
  gap: 8px;
  scrollbar-width: none;
}
#bs-tabs::-webkit-scrollbar { display: none; }

.bs-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  background: #e0e0e5;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

#bs-tabs .bs-tab img {
  width: 18px; height: 18px;
  object-fit: contain;
}

.bs-tab.active {
  background: #3676d6;
  color: #fff;
}
#bs-tabs .bs-tab.active img { filter: brightness(10); }

/* Content scroll area — document mode */
#bs-content {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  margin: 0 10px;
  -webkit-overflow-scrolling: touch;
}
#bs-content::-webkit-scrollbar { display: none; }

/* fd-doc inside bottom sheet — tighter padding on mobile */
#bs-content .fd-doc {
  padding: 20px 18px 40px;
  max-width: 100%;
}
#bs-content .fd-h1  { font-size: 20px; }
#bs-content .fd-stat-row { flex-wrap: wrap; }

#bs-content .fd-stat {
  min-width: 50%;
  border-bottom: 1px solid #e8e8e8;
}

/* ============================================================
   MAC OS X NOTIFICATION BANNER
   ============================================================ */
#mac-notif {
  position: absolute;
  top: 30px; /* just below menu bar */
  right: 14px;
  z-index: 600;
  width: 340px;

  /* Same striped shelf blue as dock */
  background-color: #b8cad8;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 0%) 1px,
      rgb(255 255 255 / 18%) 1px, rgb(255 255 255 / 18%) 2px,
      rgb(0 0 0 / 3%)       2px, rgb(0 0 0 / 3%)       3px
    ),
    linear-gradient(to bottom, rgb(255 255 255 / 20%) 0%, rgb(0 0 0 / 4%) 100%);
  border: 1px solid rgb(120 145 165 / 80%);
  border-radius: 8px;
  box-shadow:
    0 4px 18px rgb(0 0 0 / 35%),
    0 1px 0 rgb(255 255 255 / 55%) inset;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;

  /* Animate in from top-right */
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
}

#mac-notif.show {
  transform: translateX(0);
  opacity: 1;
}

#mac-notif.hide {
  transform: translateX(calc(100% + 20px));
  opacity: 0;
}

/* Download icon */
.notif-icon {
  font-size: 20px;
  flex-shrink: 0;
  color: #2a4a6a;
  line-height: 1;
}

/* ── Mobile: iOS banner style ── */
@media (width <= 767px) {
  #mac-notif {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    left: 10px;
    width: auto;
    border-radius: 16px;
    padding: 12px 14px;
    gap: 12px;

    /* iOS frosted look */
    background-color: rgb(240 242 245 / 96%);
    background-image: none;
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgb(200 205 215 / 70%);
    box-shadow: 0 8px 32px rgb(0 0 0 / 28%), 0 2px 8px rgb(0 0 0 / 14%);
  }

  .notif-icon svg path, .notif-icon svg line {
    stroke: #1a1a2e;
    fill: #1a1a2e;
  }

  .notif-icon svg line {
    stroke: rgb(240 242 245 / 96%);
    fill: none;
  }
  .notif-text { color: #111; }

  .notif-text strong {
    color: #000;
    font-size: 13px;
  }

  .notif-btn {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 14px;
  }
}

/* Text */
.notif-text {
  flex: 1;
  font-size: 12px;
  color: #1a2a3a;
  line-height: 1.4;
  font-weight: 400;
}

.notif-text strong {
  font-weight: 700;
  display: block;
  font-size: 12px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Body text: max 2 lines */
.notif-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Aqua pill button — classic Mac OS X blue */
.notif-btn {
  flex-shrink: 0;
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid #2060b0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgb(0 0 80 / 40%);
  background:
    linear-gradient(to bottom,
      #6eaaee 0%,
      #48d 40%,
      #26c 41%,
      #37d 100%
    );
  box-shadow:
    0 1px 0 rgb(255 255 255 / 45%) inset,
    0 2px 6px rgb(0 60 150 / 35%);
  transition: filter 0.1s;
}
.notif-btn:hover { filter: brightness(1.1); }
.notif-btn:active { filter: brightness(0.92); }

/* ============================================================
   STICKY NOTES — Desktop draggable + Mobile draggable near dock
   ============================================================ */

/* Desktop notes — absolutely positioned, draggable */
.sticky {
  position: absolute;
  width: 133px;       /* ~90% of 148 */
  padding: 9px 11px 13px;
  border-radius: 2px;
  font-family: 'Lucida Grande', sans-serif;
  cursor: default;
  pointer-events: all;
  box-shadow: 2px 3px 8px rgb(0 0 0 / 22%), 0 1px 2px rgb(0 0 0 / 12%);
  z-index: 10;
  user-select: none;
  transition: box-shadow 0.15s ease;
}

.sticky:hover  {
  box-shadow: 3px 5px 16px rgb(0 0 0 / 30%);
  z-index: 20;
}

.sticky.is-dragging {
  box-shadow: 6px 8px 24px rgb(0 0 0 / 35%);
  z-index: 30;
  cursor: grabbing;
}

.sticky-tape {
  height: 20px;
  margin: -9px -11px 7px;
  border-radius: 2px 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: grab;
}

.sticky-close {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgb(0 0 0 / 15%);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: rgb(0 0 0 / 35%); font-weight: bold;
  transition: background 0.1s;
  flex-shrink: 0;
}
.sticky-close:hover { background: rgb(0 0 0 / 30%); }

.sticky-plus {
  font-size: 11px;
  color: rgb(0 0 0 / 22%);
}

.sticky-text {
  font-size: 10.5px;
  color: rgb(0 0 0 / 72%);
  line-height: 1.55;
}

.sticky-rsvp { text-decoration: underline; }

.sticky-plus-muted {
  font-size: 10px;
  color: rgb(0 0 0 / 22%);
}

#sn-1 {
  top: 42px;
  left: 20px;
  transform: rotate(-1.2deg);
}

#sn-2 {
  top: 60px;
  left: 74px;
  transform: rotate(0.9deg);
}

#sn-3 {
  top: 50px;
  left: 132px;
  transform: rotate(-0.8deg);
}

#snm-1 {
  top: calc(100vh - 210px);
  left: 14px;
  transform: rotate(-1.5deg);
}

#snm-2 {
  top: calc(100vh - 220px);
  left: 148px;
  transform: rotate(1.2deg);
}

#snm-3 {
  top: calc(100vh - 232px);
  left: 262px;
  transform: rotate(-0.8deg);
}

.sticky-yellow { background: #fef08a; }
.sticky-yellow .sticky-tape { background: #fde047; }
.sticky-pink   { background: #fd9bfe; }
.sticky-pink   .sticky-tape { background: #e87ae9; }
.sticky-blue   { background: #9fc5f8; }
.sticky-blue   .sticky-tape { background: #6fa8dc; }

/* Mobile notes — draggable, positioned above dock */
.sticky-mob {
  position: absolute;
  width: 118px;
  padding: 8px 10px 12px;
  border-radius: 2px;
  font-family: 'Lucida Grande', sans-serif;
  pointer-events: all;
  box-shadow: 2px 3px 10px rgb(0 0 0 / 28%);
  z-index: 10;
  user-select: none;
  transition: box-shadow 0.15s;
}
.sticky-mob:active { box-shadow: 4px 6px 18px rgb(0 0 0 / 35%); }

.sticky-mob .sticky-tape {
  height: 20px;
  margin: -8px -10px 7px;
  border-radius: 2px 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: grab;
  touch-action: none; /* allow JS drag on this element */
}

.sticky.is-dragging .sticky-tape { cursor: grabbing; }

.sticky-mob .sticky-text {
  font-size: 10px;
  color: rgb(0 0 0 / 70%);
  line-height: 1.5;
}

/* Hide desktop notes on mobile, show mobile notes */
#sticky-notes-desktop { display: block; }

#sticky-notes-mobile  {
  display: none;
  pointer-events: none;
}

@media (width <= 767px) {
  #sticky-notes-desktop { display: none;  }

  #sticky-notes-mobile  {
    display: block;
    pointer-events: none;
    z-index: 200;
    position: absolute;
    inset: 0;
  }

  /* Sticky notes must be above mob-grid (z-index:10) and mob-dock (z-index:50) */
  .sticky-mob { z-index: 200 !important; }

  /* mob-grid should not capture pointer events — let them fall through to stickies */
  #mob-grid { pointer-events: none; }
  .mob-app  { pointer-events: all; }
}

/* Remove old mobile stack rules */
#sticky-stack-mobile { display: none !important; }
#sticky-dots         { display: none !important; }
