.angling-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 8px; }
.angling-context .rig-note { margin: 0; }
.rig-sheet button.lesson-link, dialog button.lesson-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 2px;
  color: #dec69a;
  background: transparent;
  font: 500 14px/1.35 var(--sans);
  text-decoration: underline;
  text-decoration-color: #b39b6e99;
  text-underline-offset: 4px;
}
#rig-dialog button.lesson-link {
  padding: 0 10px;
  border-block: 7px solid transparent;
  border-radius: 14px;
  background: #31483e padding-box;
  color: #e7d6ad;
  font-size: 12px;
  text-decoration: none;
}
#rig-dialog button.lesson-link:hover { color: #fff0ce; background-color: #3c5649; }

#angling-book {
  width: min(38rem, calc(100% - 20px));
  max-height: min(92dvh, 860px);
  background: #162a28;
  color: #e9e4d3;
  border: 1px solid #48635a88;
}
#angling-book .sheet {
  padding: 18px clamp(14px, 3.2vw, 24px) 20px;
}
.angling-workspace { display: grid; gap: 12px; }
.angling-stage, .angling-inspector { min-width: 0; }
.angling-inspector {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #233932;
  box-shadow: inset 0 1px 3px #0d201d55;
}
@media (min-width: 780px) {
  dialog#angling-book {
    width: min(58rem, calc(100% - 28px));
    max-width: calc(100% - 28px);
    max-height: min(860px, calc(100dvh - 28px));
  }
  .angling-workspace {
    grid-template-columns: minmax(0, 1.32fr) minmax(260px, .88fr);
    align-items: start;
    gap: 20px;
  }
}

.angling-heading, .angling-footer, .angling-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.angling-head-actions, .angling-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
#angling-book .angling-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font: 600 clamp(20px, 4vw, 23px)/1.3 var(--serif);
  letter-spacing: .06em;
}
.angling-heading .menu-icon { color: #e3c68f; }
#angling-book .close { position: static; flex: none; }

#angling-live-toggle {
  min-height: 44px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #8aa39566;
  background: #1d3633;
  color: #d9e3d8;
  font: 500 12.5px/1.2 var(--sans);
  white-space: nowrap;
}
#angling-live-toggle[aria-pressed="true"] {
  background: #334e41;
  border-color: #dec084;
  color: #f9e6bc;
}

.angling-chapters {
  display: flex;
  gap: 2px;
  margin: 12px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-block: 1px solid #73847555;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.angling-chapters::-webkit-scrollbar { display: none; }
.angling-chapters button {
  flex: 1 0 auto;
  min-height: 44px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #b7c4b8;
  font: 500 13.5px/1.3 var(--sans);
  white-space: nowrap;
  scroll-snap-align: start;
  touch-action: manipulation;
}
.angling-chapters button[aria-current="page"] {
  color: #f4d89f;
  border-bottom-color: #e3c68f;
  font-weight: 600;
}

.angling-title-row {
  flex-wrap: wrap;
  margin-bottom: 4px;
}
#angling-book article h3 {
  margin: 0;
  padding: 0;
  border: 0;
  font: 600 clamp(17px, 4vw, 21px)/1.35 var(--serif);
  letter-spacing: .02em;
  color: #f2e8cf;
}
.angling-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font: 600 12px/1.35 var(--sans);
  border: 1px solid #7b938766;
  background: #1d3533;
  color: #dfeadf;
}
.angling-badge[data-tone="ok"] { background: #1a382f; border-color: #78c9a188; color: #9de2be; }
.angling-badge[data-tone="accent"] { background: #26362d; border-color: #d8b67488; color: #f0d59b; }
.angling-badge[data-tone="warn"] { background: #3a301e; border-color: #e8b66499; color: #f7cf89; }
.angling-badge[data-tone="danger"] { background: #3e221d; border-color: #ea7562aa; color: #ffc8bc; }

#angling-instruction, #angling-observation {
  margin: 0;
  font: 400 13.5px/1.6 var(--sans);
}
#angling-instruction { color: #bcc8bb; }

.angling-plate { margin: 8px 0 0; }
#angling-illustration {
  background: #0e1f1e;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid #35504966;
}
#angling-illustration svg { display: block; width: 100%; height: auto; stroke: none; }

#angling-observation {
  margin-top: 6px;
  padding-inline: 2px;
  color: #efe2c4;
  font-variant-numeric: tabular-nums;
}

.angling-choices, .angling-chip-group, .angling-bite-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.angling-choices { gap: 4px; }

.angling-choices button,
.angling-chip,
.angling-footer button,
.angling-practice-btn {
  min-height: 40px;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid #778a7766;
  background: #1f3934;
  color: #e9e3cd;
  font: 500 13px/1.25 var(--sans);
  touch-action: manipulation;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.angling-choices button[aria-pressed="true"],
.angling-chip[aria-pressed="true"] {
  color: #fae6bc;
  background: #304d41;
  border-color: #dec084;
}
.angling-choices button[aria-disabled="true"],
.angling-chip[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
}

.angling-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.angling-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.angling-chip-group { gap: 4px; }
#angling-book:is([data-chapter="tackle"], [data-chapter="bait"]) .angling-choices,
#angling-book[data-chapter="tackle"] .angling-chip-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
#angling-book[data-chapter="tackle"] .angling-chip-group:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#angling-book:is([data-chapter="tackle"], [data-chapter="bait"]) :is(.angling-choices button, .angling-chip) {
  padding-inline: 4px;
}
.angling-row:has(.angling-chip-group) { row-gap: 2px; }
.angling-row-label {
  font: 600 12.5px/1.3 var(--sans);
  color: #a9bdb0;
}

.angling-slider-box {
  padding: 9px 12px;
  border-radius: 8px;
  background: #112423;
  border: 1px solid #415e5677;
}
.angling-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.angling-slider-val {
  font: 600 13px/1.2 var(--sans);
  color: #f3d598;
  font-variant-numeric: tabular-nums;
}
.angling-range {
  width: 100%;
  height: 30px;
  margin: 0;
  accent-color: #dfb973;
  cursor: pointer;
  touch-action: pan-y;
}
.angling-slider-hints {
  display: flex;
  justify-content: space-between;
  color: #8ca496;
  font: 400 11.5px/1.2 var(--sans);
  margin-top: 2px;
}

.angling-bead-btn {
  align-self: flex-start;
}

.angling-bite-bar {
  align-items: center;
}
.angling-strike-btn {
  flex: 1 1 170px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #f0a17c;
  background: linear-gradient(180deg, #984632, #763323);
  color: #fff3e4;
  font: 600 14.5px/1.2 var(--sans);
  letter-spacing: .04em;
  touch-action: manipulation;
}
.angling-strike-btn[data-frozen="true"] {
  border-color: #87c4a5;
  background: linear-gradient(180deg, #2b594a, #204439);
}

.angling-tip-fold { border-top: 1px solid #82948350; }
.angling-tip-fold summary {
  display: block;
  position: relative;
  padding: 12px 20px 10px 0;
  min-height: 44px;
  color: #d6c397;
  font: 500 12.5px/1.5 var(--sans);
  cursor: pointer;
  list-style: none;
}
.angling-tip-fold summary::-webkit-details-marker { display: none; }
.angling-tip-fold summary::after {
  content: '';
  position: absolute;
  top: 15px;
  right: 4px;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.angling-tip-fold[open] summary::after { transform: translateY(3px) rotate(225deg); }
.angling-tip-fold p { margin: 0; color: #d6dfd0; font: 400 13px/1.55 var(--sans); }

.angling-footer {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid #73847555;
  flex-wrap: wrap;
}
.angling-footer small {
  font: 400 12px/1.45 var(--sans);
  color: #9fb0a2;
}
.angling-practice-btn {
  border-color: #d8bc82;
  background: #2f4d3f;
  color: #fae6bc;
  font-weight: 600;
}

@media (max-width: 779px) {
  .angling-inspector { padding: 10px 12px 4px; gap: 6px; }
  .angling-workspace { gap: 8px; }
  .angling-range { display: block; height: 44px; }
  #angling-book :is(button, .angling-practice-btn) { min-width: 44px; min-height: 44px; }
  .angling-choices button, .angling-chip { padding-inline: 8px; }
  .angling-row-label { flex-basis: 100%; }
}
@media (max-width: 600px) {
  #angling-book[open] {
    width: 100%;
    max-height: 96dvh;
  }
  #angling-book[open] .sheet {
    padding: 10px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .angling-chapters { margin: 8px 0 11px; }
  .angling-chapters button { padding: 6px 8px; font-size: 13px; }
  .angling-title-row { gap: 4px 8px; }
  .angling-footer { margin-top: 9px; padding-top: 7px; }
}
