#gwStoryModeToggle{
  position:absolute;top:12px;right:12px;z-index:1002;
  display:inline-flex;align-items:center;gap:8px;min-height:40px;
  padding:7px 12px;border:1px solid rgba(255,255,255,.45);
  border-radius:999px;background:rgba(35,30,26,.88);color:#fff;
  box-shadow:0 5px 18px rgba(24,18,12,.24);
  font-family:inherit;font-size:13px;font-weight:700;line-height:1.1;cursor:pointer;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)
}
#gwStoryModeToggle:hover{background:var(--gw-accent,#b85e2b);transform:translateY(-1px)}
#gwStoryModeToggle:focus-visible,
#gwStoryModePanel button:focus-visible{outline:3px solid #f6bd63;outline-offset:2px}
#gwStoryModeToggle .gw-story-icon{width:17px;height:17px;flex:none}
#gwStoryModeToggle .gw-story-count{
  padding:3px 6px;border-radius:999px;background:rgba(255,255,255,.16);
  font-size:10px;font-weight:800;font-variant-numeric:tabular-nums
}
#gwStoryModePanel[hidden]{display:none!important}
#gwStoryModePanel{
  position:absolute;top:60px;right:12px;z-index:1001;
  display:flex;flex-direction:column;gap:12px;
  width:min(370px,calc(100% - 24px));max-height:calc(100% - 72px);
  overflow:auto;padding:16px;border:1px solid var(--gw-border,#e5dcd3);
  border-radius:14px;background:var(--gw-panel,rgba(255,251,247,.97));
  color:var(--gw-ink,#2d2925);box-shadow:0 12px 32px rgba(24,18,12,.25);
  font:13px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)
}
.gw-story-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.gw-story-kicker{
  display:block;margin-bottom:3px;color:var(--gw-accent,#b85e2b);
  font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase
}
.gw-story-heading{margin:0;font-size:18px;line-height:1.2;letter-spacing:-.02em}
.gw-story-subtitle{margin:3px 0 0;color:var(--gw-muted,#756b62);font-size:11px}
#gwStoryModeClose{
  display:grid;place-items:center;flex:none;width:32px;height:32px;
  border:1px solid var(--gw-border,#e5dcd3);border-radius:8px;
  background:var(--gw-surface,#f6f1eb);color:inherit;font-size:20px;
  line-height:1;cursor:pointer
}
.gw-story-progress-copy{display:flex;justify-content:space-between;gap:10px;font-size:11px}
#gwStoryModeProgressLabel{font-weight:800}
#gwStoryModeProgressTrack{
  height:7px;margin-top:6px;overflow:hidden;border-radius:999px;
  background:var(--gw-surface,#f2ece5)
}
#gwStoryModeProgressFill{
  display:block;width:0;height:100%;border-radius:inherit;
  background:var(--gw-accent,#b85e2b);transition:width .2s ease
}
.gw-story-current{
  padding:12px;border:1px solid var(--gw-border,#e5dcd3);
  border-left:3px solid var(--gw-accent,#b85e2b);border-radius:9px;
  background:var(--gw-surface,#f8f4ef)
}
.gw-story-objective-label{
  display:block;margin-bottom:4px;color:var(--gw-muted,#756b62);
  font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase
}
#gwStoryModeObjective{margin:0;font-size:13px;font-weight:800}
#gwStoryModeNarrative{margin:7px 0 0;color:var(--gw-muted,#756b62);font-size:12px}
#gwStoryModeDistance{margin-top:8px;color:var(--gw-muted,#756b62);font-size:11px;font-variant-numeric:tabular-nums}
#gwStoryModeDistance[data-near="true"]{color:#28734c;font-weight:800}
#gwStoryModeAction{
  width:100%;min-height:40px;padding:9px 12px;border:1px solid var(--gw-accent,#b85e2b);
  border-radius:8px;background:var(--gw-accent,#b85e2b);color:#fff;
  font-family:inherit;font-size:13px;font-weight:700;line-height:1.2;cursor:pointer
}
#gwStoryModeAction:hover:not(:disabled){filter:brightness(1.06)}
#gwStoryModeAction:disabled{
  border-color:var(--gw-border,#e5dcd3);background:var(--gw-surface,#f2ece5);
  color:var(--gw-muted,#756b62);cursor:not-allowed
}
.gw-story-list-title{margin:0;font-size:11px;font-weight:800}
#gwStoryModeChapters{
  display:grid;gap:5px;max-height:176px;margin:0;padding:0 2px 0 0;
  overflow:auto;list-style:none
}
.gw-story-chapter{
  display:grid;grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;gap:8px;min-height:30px;padding:5px 7px;
  border:1px solid transparent;border-radius:7px;color:var(--gw-muted,#756b62);
  font-size:11px
}
.gw-story-chapter-number{
  display:grid;place-items:center;width:24px;height:24px;border-radius:50%;
  background:var(--gw-surface,#f2ece5);font-size:10px;font-weight:800
}
.gw-story-chapter-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gw-story-chapter-status{font-size:9px;font-weight:800;text-transform:uppercase}
.gw-story-chapter--active,.gw-story-chapter--next{
  border-color:var(--gw-accent,#b85e2b);background:var(--gw-accent-soft,#f1e6dc);
  color:var(--gw-ink,#2d2925)
}
.gw-story-chapter--active .gw-story-chapter-number,
.gw-story-chapter--next .gw-story-chapter-number{background:var(--gw-accent,#b85e2b);color:#fff}
.gw-story-chapter--complete .gw-story-chapter-number{background:#e7f1e8;color:#28734c}
.gw-story-chapter--complete .gw-story-chapter-status{color:#28734c}
#gwStoryModeSaveNote{margin:0;color:var(--gw-muted,#756b62);font-size:10px}

@media(max-width:520px){
  #gwStoryModePanel{
    top:58px;right:8px;width:min(370px,calc(100% - 16px));
    max-height:calc(100% - 66px);padding:13px
  }
  #gwStoryModeToggle{top:10px;right:8px;min-height:36px;padding:6px 9px}
}
@media(prefers-reduced-motion:reduce){
  #gwStoryModeToggle,#gwStoryModeProgressFill{transition:none}
}