  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    height: 100%;
    background: #000;
    color: #f5f5f5;
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
  }

  #story-frame, #original-page-frame {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
  }
  #story-frame { background: #000; }
  #original-page-frame { background: #fff; z-index: 900; }

  #status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #888;
    text-align: center;
    padding: 0 2rem;
  }

  #back-button {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: none;
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
  }
  #back-button:hover { background: #444; }

  #toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: none;
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  #flyout {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: rgba(15, 15, 15, 0.97);
    border-right: 1px solid #333;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 950;
    display: flex;
    flex-direction: column;
  }
  #flyout.open { transform: translateX(0); }
  #flyout-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #flyout-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
  }
  #flyout-list { flex: 1; overflow-y: auto; padding: 0.5rem; }
  #flyout-handle {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    z-index: 940;
  }

  .flyout-item {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #1a1a1a;
    cursor: pointer;
  }
  .flyout-item:hover { background: #262626; }
  .flyout-item.active { border-color: #8ab4f8; }
  .flyout-num { width: 1.5rem; text-align: center; color: #888; font-size: 0.85rem; flex-shrink: 0; }
  .flyout-thumb {
    width: 80px;
    height: 50px;
    border-radius: 4px;
    background: #333;
    object-fit: cover;
    flex-shrink: 0;
  }
  .flyout-title {
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
  }
