/* =====================================================================================================================
   Crew Wars, pages (3 of 3): one war (the battlefield), a crew's page (its banner and standing), My Crew, HQ, and the right rail (the war council).
   ===================================================================================================================== */

.cw-crumbs { display: flex; gap: 8px; margin: 0 0 12px; font-size: .84rem; color: var(--muted); } .cw-crumbs a { color: var(--cw-fire-2); }

/* ---------------------------------------------------------------- the three scene heads share the hero's frame: the painting, the soot edge (cw-pages.css) */
.cw-warhead, .cw-crewhead, .cw-flowhead { position: relative; isolation: isolate; color: #fff; background: #0a0705; box-shadow: 0 30px 56px -28px rgba(0, 0, 0, .95), 0 0 60px -24px rgba(255, 130, 40, .36); }
.cw-warhead { --sx: 50%; --sy: 44%; } .cw-crewhead { --sx: 26%; --sy: 42%; } .cw-flowhead { --sx: 72%; --sy: 40%; }

/* ---------------------------------------------------------------- one war: two standards, the clock between them */
.cw-warhead { margin: 0 0 26px; padding: clamp(36px, 4vw, 50px) clamp(34px, 4vw, 56px) clamp(38px, 4vw, 50px); }
.cw-warhead .cw-s-shade { background: linear-gradient(90deg, rgba(150, 40, 34, .5), rgba(8, 5, 3, .66) 30% 70%, rgba(40, 96, 128, .5)), linear-gradient(0deg, rgba(8, 5, 3, .7), transparent 44%), radial-gradient(120% 100% at 50% 46%, transparent 50%, rgba(0, 0, 0, .55)); }
.cw-warhead.is-urgent { box-shadow: 0 0 0 2px rgba(255, 122, 74, .5), 0 0 56px -4px rgba(255, 70, 30, .7), 0 30px 56px -28px rgba(0, 0, 0, .95); }
.cw-war-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cw-warhead .cw-state { color: #e0d2b4; }
.cw-battlefield { display: grid; grid-template-columns: minmax(0, 1fr) minmax(176px, 250px) minmax(0, 1fr); align-items: start; gap: 12px; margin: 8px 0 14px; }
.cw-battlefield .cw-standard { padding-top: 28px; }
.cw-battlefield .cw-flagpost { max-width: 252px; min-height: 300px; } .cw-battlefield .cw-flagpost .cw-crest { --s: 100px; } .cw-battlefield .cw-flagpost > b { font-size: 1.22rem; } .cw-flagpost > b a { color: inherit; text-decoration: none; } .cw-flagpost > b a:hover { color: var(--cw-ember); }
.cw-fp-rank { display: inline-flex; margin-top: 6px; }
.cw-champ-flag.is-role { color: #e8dcc4; background: linear-gradient(180deg, #5a4a38, #2a2016); }
.cw-standard.is-winner .cw-flagpost { filter: drop-shadow(0 14px 10px rgba(0, 0, 0, .65)) drop-shadow(0 0 26px rgba(217, 173, 92, .85)); }
.cw-standard.is-loser .cw-flagpost { filter: grayscale(.85) brightness(.6) drop-shadow(0 14px 10px rgba(0, 0, 0, .65)); }
.cw-standard.is-mine .cw-flagpost::before { content: none; }
.cw-center { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; align-self: center; min-height: 230px; }
/* a ship's wheel turns, very slowly, behind the countdown */
.cw-center::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 270px; height: 270px; translate: -50% -50%; pointer-events: none; background: url("../img/cw/wheel.svg?v=07165e3dea") center / contain no-repeat; opacity: .3; filter: sepia(.7) saturate(.6) brightness(.6) drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); animation: cw-rays 160s linear infinite; }
.cw-ring { --p: 50; position: relative; display: grid; place-items: center; width: 176px; height: 176px; border-radius: 50%; box-shadow: 0 0 0 3px #0a0603, 0 0 0 5px rgba(184, 138, 70, .9), 0 14px 26px rgba(0, 0, 0, .65), 0 0 28px rgba(255, 130, 40, .34); }
.cw-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #ffe2b0, #ffb347 calc(var(--p) * .55%), #ff6a1f calc(var(--p) * 1%), rgba(255, 236, 200, .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px)); mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px)); }
.cw-ring::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #3a2a1c, #0c0805 74%); box-shadow: inset 0 0 0 2px rgba(184, 138, 70, .45), inset 0 8px 16px rgba(0, 0, 0, .7); }
.cw-ring-t { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.cw-ring-t .cw-left-t { font: 800 1.8rem/1 var(--cw-serif); letter-spacing: .02em; color: var(--cw-gold-hi); text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 150, 50, .5); } .cw-ring-t small { margin-top: 5px; font: 800 .66rem/1 var(--label); letter-spacing: .24em; text-transform: uppercase; color: #b8a688; }
.cw-ring.is-urgent { animation: cw-throb 1.2s ease-in-out infinite; } .cw-ring.is-urgent .cw-left-t { color: #ff9a7a; }
.cw-laurel { width: 168px; height: 168px; filter: drop-shadow(0 8px 10px #000) drop-shadow(0 0 22px rgba(217, 173, 92, .6)); animation: cw-throb 3s ease-in-out infinite; } .cw-laurel .cwi { width: 100%; height: 100%; }
.cw-center .cw-bigswords { width: 132px; height: 132px; }
.cw-center .cw-vs { width: 58px; height: 58px; }
.cw-clock { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; } .cw-clock .cw-meter { flex: 1 1 220px; height: 12px; } .cw-clock small { color: #d6c8a8; }
.cw-result { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 14px 20px; font-size: 1.06rem; border-radius: 3px; background: linear-gradient(90deg, rgba(217, 173, 92, .22), rgba(8, 5, 3, .55)); box-shadow: inset 0 0 0 1px rgba(217, 173, 92, .5); }
.cw-result .cwi { width: 28px; height: 28px; }
.cw-result.is-void { background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 236, 200, .18); }
.cw-deltas { display: inline-flex; flex-wrap: wrap; gap: 10px; font-size: .86rem; font-weight: 800; } .cw-deltas .up { color: var(--cw-win); } .cw-deltas .down { color: #f0a8a0; }
.cw-war-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; } .cw-war-main, .cw-war-side { min-width: 0; }
.cw-big { font-size: 1.12rem; line-height: 1.55; } .cw-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } .cw-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--cw-fire-2); } .cw-links .cwi, .cw-links .ic { width: 18px; height: 18px; }
.cw-score { display: inline-block; padding: 2px 12px; font-weight: 900; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px var(--cw-line); clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.cw-answer { display: grid; gap: 14px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--cw-line); } .cw-dispute { display: grid; gap: 8px; } .cw-dispute textarea { width: 100%; }
.cw-report { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--cw-line); } .cw-report h3 { margin: 0; }
.cw-pick-winner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.cw-win { position: relative; display: flex; cursor: pointer; } .cw-win input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 2; }
.cw-win > span { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 15px 16px; font: 800 .95rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; text-align: center; border-radius: 3px; background: linear-gradient(180deg, #34261a, #181008); box-shadow: inset 0 0 0 1px #6a5238, inset 0 1px 0 rgba(255, 224, 170, .1);
  transition: box-shadow .15s, background .15s, transform .15s; }
.cw-win:hover > span { transform: translateY(-2px); }
.cw-win.side-a:has(input:checked) > span { background: linear-gradient(180deg, rgba(196, 68, 58, .5), rgba(96, 18, 14, .7)); box-shadow: inset 0 0 0 2px #d65a4e, 0 0 20px -6px #d65a4e; }
.cw-win.side-b:has(input:checked) > span { background: linear-gradient(180deg, rgba(96, 148, 180, .5), rgba(24, 56, 84, .7)); box-shadow: inset 0 0 0 2px #78a2bd, 0 0 20px -6px #78a2bd; }
.cw-win:has(input:focus-visible) > span { outline: 2px solid var(--cw-ember); outline-offset: 2px; }
.cw-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cw-scrollpanel .cw-rules-text { margin-top: 10px; }
/* the chronicle: events hung on a rope, each with its wax seal */
.cw-timeline { display: grid; gap: 0; margin: 4px 0 0; padding: 0 0 0 38px; list-style: none; position: relative; }
.cw-timeline::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 8px; background: url("../img/cw/rope.webp?v=1dd6b0e1e9") center top / 8px auto repeat-y; filter: drop-shadow(0 1px 1px #000); }
.cw-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 18px; }
.cw-tl-seal { position: absolute; left: -38px; top: -4px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #d0584a, #962a20 55%, #4a0e0a); box-shadow: 0 0 0 2px #0b0806, 0 3px 5px rgba(0, 0, 0, .7), inset 0 -3px 4px rgba(0, 0, 0, .3); }
.cw-tl-seal .cwi { width: 16px; height: 16px; } .cw-timeline li.e-fought .cw-tl-seal, .cw-timeline li.e-forfeit .cw-tl-seal { background: radial-gradient(circle at 36% 30%, #7cc386, #3a8a4e 55%, #174a28); }
.cw-timeline li.e-disputed .cw-tl-seal { background: radial-gradient(circle at 36% 30%, #f0c46a, #c4821a 55%, #6a3a06); } .cw-timeline li.e-void .cw-tl-seal { background: radial-gradient(circle at 36% 30%, #a8a090, #5a5448 55%, #22201a); }
.cw-timeline time { font-size: .76rem; color: var(--muted); } .cw-timeline b { font: 800 .92rem/1.15 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff1d4; } .cw-timeline span:not(.cw-tl-seal) { font-size: .9rem; color: var(--text-soft); }
.cw-mod .form { margin-bottom: 14px; }

/* ---------------------------------------------------------------- a crew's page: its banner, standing, rules, wars, roster */
.cw-crewhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; margin: 0 0 26px; padding: clamp(40px, 4vw, 54px) clamp(34px, 3.6vw, 52px) clamp(46px, 4.4vw, 60px); }
.cw-crewhead .cw-s-shade { background: linear-gradient(90deg, rgba(8, 5, 3, .9), rgba(8, 5, 3, .48) 58%, rgba(8, 5, 3, .08)), radial-gradient(500px 280px at 0 100%, rgba(var(--card-tint-rgb, 255, 122, 43), .26), transparent 70%), linear-gradient(0deg, rgba(8, 5, 3, .6), transparent 40%), radial-gradient(120% 100% at 50% 46%, transparent 52%, rgba(0, 0, 0, .55)); }
.cw-crewhead .cw-standard { width: 200px; } .cw-crewhead .cw-flagpost { max-width: 200px; min-height: 310px; } .cw-crewhead .cw-flagpost .cw-crest { --s: 112px; }
.cw-crewhead-main { min-width: 0; position: relative; z-index: 1; } .cw-crewhead-main .cw-muted { color: #d6c8a8; margin: 0; } .cw-crewhead-main a { color: #ffd7b8; }
.cw-crewhead-act { position: relative; z-index: 4; display: flex; flex-wrap: wrap; flex-direction: column; align-items: stretch; gap: 10px; } .cw-crewhead-act form { margin: 0; } .cw-crewhead-act .btn { width: 100%; }
.cw-crewhead .btn-ghost:where(:not(:hover, :focus-visible)) { --b-ink: #fff; }
.cw-standings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0 0 30px; }
.cw-stand { padding: 28px 30px; } .cw-stand header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cw-stand h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 1.15rem/1.05 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--kc); text-shadow: 0 2px 0 #000; } .cw-stand h2 .cwi { width: 32px; height: 32px; }
.cw-stand .cw-medal { width: auto; min-width: 42px; height: 38px; padding: 0 12px; border-radius: 99px; }
.cw-bigelo { margin: 14px 0 12px; font: 800 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--cw-serif); letter-spacing: .02em; color: var(--cw-gold-hi); text-shadow: 0 3px 0 #1a0f06, 0 0 22px rgba(255, 170, 70, .28); }
.cw-bigelo small { margin-left: 10px; font: 800 .72rem/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.cw-statline { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 12px; padding: 0; list-style: none; } .cw-statline li { display: flex; flex-direction: column; } .cw-statline b { font: 800 1.3rem/1.1 var(--cw-serif); color: #f6e9cc; } .cw-statline span { font: 800 .68rem/1.3 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cw-rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cw-rules-card { min-width: 0; padding: 28px 30px; } .cw-rules-card h3 { margin: 0 0 14px; font: 800 1.2rem/1.05 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--kc); text-shadow: 0 2px 0 #000; } .cw-rules-card h3 small { font: 700 .76rem/1 var(--label); letter-spacing: .04em; text-transform: none; color: var(--muted); text-shadow: none; }
.cw-ready { display: grid; gap: 12px; margin: 0 0 10px; padding: 0; list-style: none; }
.cw-ready li { display: flex; align-items: center; gap: 14px; padding: 16px 20px; } .cw-ready li > .cwi, .cw-ready li > .ic { width: 24px; height: 24px; flex: none; } .cw-ready li > span { flex: 1; min-width: 0; }
.cw-ready li.ok > .ic { color: var(--cw-win); } .cw-ready li.bad > .ic { color: var(--cw-warn); }
.cw-modes { display: flex; flex-wrap: wrap; gap: 10px; } .cw-modes li { padding: 10px 16px; } .cw-modes li > span { flex: none; font: 900 1rem/1 var(--label); }
.cw-modechip { display: inline-block; margin: 0 4px 0 0; padding: 2px 9px; font: 800 .74rem/1.3 var(--label); background: rgba(0, 0, 0, .42); border-radius: 2px; } .cw-modechip.ok { color: var(--cw-win); } .cw-modechip.bad { color: var(--muted); text-decoration: line-through; }
.cw-crewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 0 0 24px; padding: 26px 30px; }
.cw-crewbar::before { box-shadow: inset 0 3px 0 0 #d9ad5c, inset 0 0 46px rgba(0, 0, 0, .62); }
.cw-crewbar-main { flex: 1 1 240px; min-width: 0; } .cw-crewbar-main h2 { margin: 0; font: 800 1.7rem/1.05 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #f6e9cc; text-shadow: 0 3px 0 #000; } .cw-crewbar-main h2 a { color: inherit; text-decoration: none; } .cw-crewbar-main p { margin: 4px 0 8px; }
.cw-crewbar-act { display: flex; flex-wrap: wrap; gap: 8px; } .cw-hq-title { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cw-fh-ranks { display: flex; }

/* ---------------------------------------------------------------- the right rail: the war council */
.cw-rail-me { display: grid; gap: 12px; }
.cw-rail-crew { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; } .cw-rail-crew span:not(.cw-crest) { display: flex; flex-direction: column; min-width: 0; }
.cw-rail-crew b { font: 800 1rem/1.15 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #f6e9cc; overflow-wrap: anywhere; text-shadow: 0 2px 0 #000; } .cw-rail-crew small { color: var(--muted); font-size: .8rem; }
.cw-rail-ranks { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-rail-alert { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 3px; background: linear-gradient(90deg, rgba(217, 173, 92, .24), rgba(0, 0, 0, .32)); box-shadow: inset 0 0 0 1px rgba(217, 173, 92, .5); }
.cw-rail-alert .cwi { width: 30px; height: 30px; flex: none; } .cw-rail-alert span { display: flex; flex-direction: column; } .cw-rail-alert small { color: var(--muted); }
.cw-rail-note { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.cw-rail-nav { display: grid; gap: 8px; padding: 18px !important; }
.cw-rail-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 5px 8px; color: #f6e9cc; text-decoration: none; font: 800 .8rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 0 #000;
  border: 8px solid transparent; border-image: var(--cw-burn-r) 24 / 8px round; background: #2a1a10 var(--cw-tex-planks) center / 240px padding-box; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .6)); transition: transform .15s, filter .15s; }
.cw-rail-nav a .cwi { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 2px 2px #000); } .cw-rail-nav a span { flex: 1; }
.cw-rail-nav a:hover { transform: translateX(3px); filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .6)) drop-shadow(0 0 12px rgba(217, 173, 92, .4)); }
.cw-rail-nav a.on { color: #ffe2a6; background-image: linear-gradient(rgba(255, 140, 50, .36), rgba(255, 90, 20, .08) 85%), var(--cw-tex-planks); background-size: auto, 240px; text-shadow: 0 1px 0 #3a1a02, 0 0 10px rgba(255, 180, 70, .6); filter: drop-shadow(0 0 14px rgba(255, 150, 50, .55)) drop-shadow(0 5px 5px rgba(0, 0, 0, .6)); }
.cw-rail-nav .cw-count { position: static; animation: none; }
.cw-rail-war { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 3px; background: rgba(0, 0, 0, .38); box-shadow: inset 4px 0 0 var(--cw-fire), inset 0 0 0 1px rgba(255, 236, 200, .08); transition: background .15s, transform .15s; }
.cw-rail-war:hover { background: rgba(255, 150, 50, .14); transform: translateX(2px); } .cw-rail-war.tone-gold { box-shadow: inset 4px 0 0 var(--cw-gold), inset 0 0 0 1px rgba(255, 236, 200, .08); } .cw-rail-war.tone-danger { box-shadow: inset 4px 0 0 var(--cw-lose), inset 0 0 0 1px rgba(255, 236, 200, .08); }
.cw-rail-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; } .cw-rail-vs .cwi { width: 16px; height: 16px; } .cw-rail-war small { color: var(--muted); font-size: .8rem; }
.cw-rail-foot { margin: 0; text-align: center; font-size: .76rem; color: var(--muted); }

@media (max-width: 1100px) { .cw-war-grid { grid-template-columns: 1fr; } .cw-rules-grid { grid-template-columns: 1fr; } .cw-crewhead { grid-template-columns: auto minmax(0, 1fr); } .cw-crewhead-act { grid-column: 1 / -1; flex-direction: row; } .cw-crewhead-act .btn { width: auto; } }
@media (max-width: 860px) {
  .cw-battlefield { grid-template-columns: 1fr 1fr; } .cw-center { grid-column: 1 / -1; grid-row: 2; min-height: 0; flex-direction: row; justify-content: center; } .cw-ring { width: 136px; height: 136px; } .cw-ring-t .cw-left-t { font-size: 1.4rem; }
  .cw-center .cw-bigswords, .cw-laurel { width: 100px; height: 100px; } .cw-center .cw-vs { display: none; }
  .cw-standings, .cw-pick-winner, .cw-two { grid-template-columns: 1fr; } .cw-crewhead { grid-template-columns: 1fr; justify-items: center; text-align: center; } .cw-crewhead .cw-kicker { justify-content: center; } .cw-crewhead-act { justify-content: center; }
}
@media (max-width: 560px) { .cw-battlefield .cw-flagpost { padding-inline: 8px; } .cw-battlefield .cw-flagpost .cw-crest { --s: 72px; } .cw-battlefield .cw-flagpost > b { font-size: .95rem; } }
