/* Work-local guide tables and walkthrough prose. Shared frame and controls stay common. */
.guide-section { overflow-wrap: anywhere; }
.guide-section h2, .guide-section h3 { color: var(--accent); }
.guide-section p { line-height: 1.8; }
.guide-summary { border-left: 4px solid var(--accent); padding: .65rem .9rem; background: var(--soft-bg, #f8f4ec); line-height: 1.75; }
.guide-muted { color: var(--muted, #625b52); font-size: .92rem; line-height: 1.65; }
.guide-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.1rem; padding-left: 1.35rem; }
.guide-toc a { display: inline-block; padding: .3rem 0; }
.guide-battle { padding: 1rem 0; border-top: 1px solid var(--line, #d5c7b4); scroll-margin-top: 1rem; }
.guide-battle h4 { color: var(--accent); margin: 0 0 .55rem; font-size: 1.05rem; }
.guide-steps { padding-left: 1.6rem; line-height: 1.8; }
.guide-steps li + li { margin-top: .45rem; }
.guide-conditions { margin: .5rem 0 1rem; }
.guide-conditions > div { display: grid; grid-template-columns: minmax(8rem, 24%) minmax(0, 1fr); gap: .65rem; padding: .55rem 0; border-bottom: 1px solid var(--line, #d5c7b4); }
.guide-conditions dt { font-weight: 700; }
.guide-conditions dd { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.guide-table-wrap { max-width: 100%; overflow-x: auto; }
.guide-list-table { width: 100%; min-width: 0; table-layout: fixed; }
.guide-list-table th, .guide-list-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.guide-list-table th:first-child { width: 31%; }
.guide-list-table td { line-height: 1.65; }
#unit-list .guide-list-table th:first-child { width: 20%; }
#unit-list .guide-list-table th:nth-child(2) { width: 37%; }
#unit-list .guide-list-table th:nth-child(3) { width: 43%; }
#coop-finals .guide-list-table th:first-child { width: 18%; }
#coop-finals .guide-list-table th:nth-child(2), #coop-finals .guide-list-table th:nth-child(3) { width: 41%; }
#story-achievements .guide-list-table th:first-child, #other-achievements .guide-list-table th:first-child { width: 25%; }
#story-achievements .guide-list-table th:nth-child(2), #other-achievements .guide-list-table th:nth-child(2) { width: 34%; }
#story-achievements .guide-list-table th:nth-child(3), #other-achievements .guide-list-table th:nth-child(3) { width: 41%; }
.reward-list { list-style: none; margin: 0; padding: 0; }
.reward-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7.5rem, auto); gap: .6rem; padding: .2rem 0; }
.reward-list li + li { border-top: 1px dotted var(--line, #d5c7b4); }
.reward-list li span { color: var(--muted, #625b52); font-size: .9rem; text-align: right; }
.reward-none { color: var(--muted, #625b52); }
@media (max-width: 850px) {
  .guide-toc { grid-template-columns: 1fr; }
  .guide-conditions > div { grid-template-columns: 1fr; gap: .2rem; }
  .guide-list-table th, .guide-list-table td { padding: .45rem .35rem; font-size: .88rem; }
  .reward-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .reward-list li span { text-align: left; }
}

/* Stack guide table fields at phone widths using the existing labeled-row layout. */
    @media (max-width: 600px) {
      .guide-list-table, .guide-list-table tbody, .guide-list-table tr, .guide-list-table td { display: block; width: 100%; }
      .guide-list-table caption { display: block; width: 100%; box-sizing: border-box; } .guide-list-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
      .guide-list-table tbody tr { margin: .65rem 0; padding: .28rem .65rem; border: 1px solid rgba(70, 61, 49, .2); border-radius: 10px; background: rgba(255, 255, 255, .56); }
      .guide-list-table tbody td { display: grid; grid-template-columns: minmax(6.1rem, 31%) minmax(0, 1fr); gap: .55rem; padding: .5rem 0; border-bottom: 1px solid rgba(70, 61, 49, .12); }
      .guide-list-table tbody td:last-child { border-bottom: 0; }
      .guide-list-table tbody td::before { content: attr(data-label); font-size: .82rem; font-weight: 700; color: var(--accent); }
      .guide-list-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .56); }
    }

@media (max-width: 600px) {
  #main-rewards .guide-list-table tbody td, #dream-rewards .guide-list-table tbody td { grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr); }
}
