/* v1.3 capability UI styles, owner W-WORLD-UI: rivals, "Tomorrow in town", quests. Light, spaced, 56 px targets. */
.w-soft { color: var(--soft); font-weight: 600; }
.w-sub { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 16px; font-weight: 700; flex-wrap: wrap; }
.w-price { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.w-sub .tt-star { width: 18px; height: 18px; }

/* rival list (planning card body and live panel) */
.w-rivals { display: flex; flex-direction: column; gap: 12px; }
.w-rivals .live-note { margin: 0; }
.w-rival { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 3px solid var(--line); border-radius: 16px; border-left: 8px solid var(--c); }
.w-rival-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.w-rival-txt > b { font-size: 20px; }
.w-rival .tt-btn { padding: 0 20px; flex: none; }

/* visit card: You vs Them */
.w-visit-wrap { width: min(460px, 46vw); }
body.w-day-visit #corner { top: auto; bottom: 18px; }
body.w-day-visit .w-visit-wrap { top: 150px; bottom: 90px; }
.w-toast { max-width: min(540px, 54vw); } .w-toast > span { white-space: normal; line-height: 1.25; }
.w-visit h2 { margin-bottom: 8px; }
.w-vs { width: 100%; border-collapse: collapse; font-size: 17px; table-layout: fixed; }
.w-vs .w-col-l { width: 44%; }
.w-vs thead th { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); text-align: left; padding: 0 6px 6px; }
.w-vs thead th.w-them { color: var(--soft); }
.w-vs thead small { display: block; text-transform: none; letter-spacing: 0; color: var(--soft); font-size: 13px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-vs tbody tr + tr > * { border-top: 2px solid var(--line); }
.w-vs tbody th { text-align: left; font-weight: 700; padding: 5px 6px 5px 0; display: flex; align-items: center; gap: 8px; line-height: 1.15; font-size: 16px; }
.w-vs tbody th .tt-icon { vertical-align: middle; }
.w-vs td { padding: 5px 6px; overflow-wrap: anywhere; hyphens: auto; line-height: 1.1; }
.w-vs td b { font-size: 19px; }
.w-vs td .tt-icon { vertical-align: middle; }
.w-vs td .tt-stars { gap: 1px; } .w-vs td .tt-star { width: 15px; height: 15px; }
.w-vs td.is-win b { color: var(--good); }
.w-vs td.is-win .tt-stars { filter: drop-shadow(0 0 3px rgba(31, 157, 85, .45)); }
.w-vs td[data-tip] { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 4px; }
.w-item { margin-left: 4px; font-weight: 700; font-size: 14px; vertical-align: middle; max-width: calc(100% - 36px); display: inline-block; overflow: hidden; text-overflow: ellipsis; }
.w-h { display: flex; align-items: center; gap: 8px; }
.w-ideas { display: flex; flex-direction: column; gap: 10px; }
.w-idea { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 16px; background: #fff8e6; }
.w-visit .row.end { position: sticky; bottom: -20px; background: var(--paper); margin: 10px -22px -20px; padding: 10px 22px 16px; border-radius: 0 0 var(--radius) var(--radius); z-index: 1; }
@media (max-height: 800px) { .w-visit .row.end { bottom: -16px; margin: 8px -18px -16px; padding: 8px 18px 12px; } .w-vs tbody th, .w-vs td { padding-top: 3px; padding-bottom: 3px; } .w-visit h3.w-h { margin: 8px 0 6px; } }
.w-idea.is-done { background: #e9f7ee; }
.w-idea-txt { flex: 1 1 auto; font-weight: 700; font-size: 16px; line-height: 1.2; }
.w-idea .tt-btn { flex: none; padding: 0 18px; font-size: 18px; }
.w-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 17px; background: rgba(255, 255, 255, .22); border-radius: 99px; padding: 2px 8px 2px 3px; }
.w-idea .tt-btn:has(.w-cost) { flex-direction: column; gap: 2px; padding: 4px 14px; line-height: 1.05; }
.w-done { flex: none; font-weight: 900; color: var(--good); padding: 0 10px; }

/* newspaper + quest offer */
.w-news-wrap { width: min(600px, 92vw); }
.w-news, .w-offer { padding-top: 26px; }
.w-news-head { display: flex; gap: 18px; align-items: flex-start; }
.w-news-txt { display: flex; flex-direction: column; gap: 6px; }
.w-news-txt h2 { margin: 0; }
.w-news-txt p { margin: 0; }
.w-news-rival { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 12px 0 0; padding: 8px 12px; background: #f6f1e6; border-radius: 14px; }
.w-what { font-weight: 800; margin: 16px 0 8px; }
.w-choices { display: flex; flex-direction: column; gap: 10px; }
.w-choices .tt-btn { justify-content: flex-start; text-align: left; line-height: 1.2; padding: 8px 24px; }
.w-giver { color: var(--accent); font-size: 17px; text-transform: uppercase; letter-spacing: .04em; }
.w-quest-text { font-size: 22px; font-weight: 800; line-height: 1.25; }
.w-reward { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 8px 14px; background: #fff8e6; border-radius: 16px; flex-wrap: wrap; }
.w-reward-l { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--soft); }
.w-reward-p { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; }
.w-news .row.end, .w-offer .row.end { margin-top: 16px; }

/* HUD quest chip */
.hud-caps { justify-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: auto; }
.q-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 16px 6px 8px; border: 0; border-radius: 999px; background: var(--paper);
  box-shadow: var(--shadow); font: inherit; color: var(--ink); cursor: pointer; }
.q-txt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.q-lab { font-size: 14px; font-weight: 800; color: var(--soft); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.q-bar { display: block; width: 110px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.q-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.q-n { font-size: 22px; font-weight: 900; white-space: nowrap; }

/* recap quest line */
.w-rq { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 6px 12px; border-radius: 16px; background: #f6f1e6; cursor: default; }
.w-rq-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.w-rq-txt > b { font-size: 16px; }
.w-rq-txt .w-soft { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-rq-txt .q-bar { width: 100%; }
.w-rq.is-done { background: #e9f7ee; animation: w-pop .5s ease 1.2s both; }
.w-rq.is-done .w-rq-txt > b { color: var(--good); font-size: 18px; }
.w-rq-reward { display: flex; gap: 12px; flex: none; }
@keyframes w-pop { from { transform: scale(.94); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } }
@media (max-height: 800px) { .w-rq { margin-top: 6px; padding: 4px 10px; } .w-rq .tt-icon { --s: 34px !important; } }

/* mid-day event: the live row that helps pulses, the shop button glows */
body[data-world-pulse] .shop-btn { animation: w-glow 1.2s ease-in-out infinite; }
@keyframes w-glow { 50% { box-shadow: 0 0 0 6px rgba(255, 196, 40, .6); } }
body[data-world-pulse=rush] #drawer [data-sec=rush], body[data-world-pulse=cook] #drawer [data-sec=cook], body[data-world-pulse=flyers] #drawer [data-sec=flyers],
body[data-world-pulse=price] #drawer [data-sec=price], body[data-world-pulse=supplier] #drawer [data-sec=supplier], body[data-world-pulse=menu] #drawer [data-sec=menu],
body[data-world-pulse=rivals] #drawer [data-sec=rivals] { border-color: #f0b400; animation: pulse 1s ease-in-out infinite; }
