/* Clans + battle replay viewer (owner 2026-11-15). Same tokens and flat cut-corner language as app.css (06 §1.1). */

/* ---------- clan screens ---------- */
.emblem { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.emblem img, .emblem svg { display: block; width: 100%; height: 100%; }
.clan-lv { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--text-1);
  border: 5px solid transparent; border-image: url(/art/ui/ui_clan_level.png) 10 14 10 14 fill / 5px 7px stretch; background: transparent; line-height: 1; }
.clan-em { position: relative; display: inline-flex; flex: none; }
.clan-em .clan-lv { position: absolute; right: -6px; bottom: -6px; }
.clan-searchbar { display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-bottom: 12px; background: var(--surface-1); border: 1px solid var(--line); min-height: 44px; }
.clan-searchbar input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text-1); font: inherit; min-height: 42px; outline: none; }
.clan-intro p { margin: 0 0 6px; }
.clan-reward { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--signal-warn); color: var(--signal-warn); font-size: 13px; }
.clan-list h3 { margin-bottom: 4px; }
.clan-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; cursor: pointer; min-height: 64px; }
.clan-row.dim { opacity: .72; }
.clan-mid { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.clan-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--text-2); align-items: center; }
.clan-meta .ico { vertical-align: -2px; }
.clan-right { display: flex; justify-content: flex-end; }
.clan-st { font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); white-space: nowrap; color: var(--text-2); }
.clan-st.req { border-color: var(--signal-warn); color: var(--signal-warn); }
.clan-st.full { color: var(--text-2); }
.clan-st.mine { border-color: var(--text-1); color: var(--text-1); }
.clan-join { min-width: 76px; }
.clan-cta { margin: 4px 0 12px; }
.clan-cta p { margin: 6px 0 0; text-align: center; }
.clan-detail-top { display: flex; gap: 14px; align-items: center; }
.clan-detail dl.kv { margin: 0; }
.clan-preview { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.clan-create input, .clan-create select, .clan-chat input, textarea { width: 100%; min-height: 40px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-1); font: inherit; padding: 6px 10px; }
.clan-create .field { margin-bottom: 10px; }
.clan-pick { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.clan-pick::-webkit-scrollbar { display: none; }
.clan-opt { flex: none; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; padding: 0; }
.clan-opt.on { border-color: var(--text-1); outline: 2px solid var(--signal-warn); outline-offset: -2px; }
.clan-swatch { display: block; width: 26px; height: 26px; }
.clan-card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.clan-card-id h2 { margin: 0; }
.clan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.clan-stats > div { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 8px; }
.clan-xp .bar { margin: 4px 0; }
.clan-xp .bar > i { background: var(--signal-warn); }
.clan-ops { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; cursor: pointer; color: var(--text-1); }
.clan-ops > span:nth-child(2) { display: flex; flex-direction: column; }
.clan-member { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.clan-member.me b { color: var(--signal-warn); }
.clan-rank { font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); text-align: center; color: var(--text-2); }
.clan-rank.leader { border-color: var(--signal-warn); color: var(--signal-warn); }
.clan-rank.officer { border-color: var(--text-1); color: var(--text-1); }
.clan-chat-log { min-height: 120px; border: 1px dashed var(--line); padding: 10px; margin-bottom: 8px; }
.clan-leave { margin-top: 4px; color: var(--text-2); }

/* ---------- battle replay viewer ---------- */
.bv { position: fixed; inset: 0; z-index: 40; background: #06080c; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--text-1); }
.bv-top { padding: calc(8px + var(--safe-t)) 12px 6px; background: rgba(13,16,21,.85); border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.bv-bot { padding: 6px 12px calc(10px + var(--safe-b)); background: rgba(13,16,21,.85); border-top: 1px solid var(--line); display: grid; gap: 6px; }
.bv-title { font-family: var(--font-head); }
.bv-x { min-width: 40px; min-height: 40px; background: none; border: 0; color: var(--text-1); cursor: pointer; }
.bv-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.bv-hp .row { gap: 6px; }
.bv-hpbar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.bv-hpbar > i { position: absolute; inset: 0 auto 0 0; width: 100%; transition: width .25s linear; }
.bv-ctrl .btn.small { min-height: 34px; min-width: 40px; padding: 0 8px; }
.bv-loading, .bv-reduced { grid-row: 1 / -1; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.bv-reduced .bv-result { position: static; transform: none; }
.bv-result { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); max-width: 420px; margin: 0 auto; max-height: 80dvh; overflow-y: auto;
  background: var(--surface-1); border: 1px solid var(--text-1); padding: 14px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.bv-result-title { font: 600 24px/1.2 var(--font-head); letter-spacing: .04em; }
.bv-result.win .bv-result-title { color: #8FE3B0; }
.bv-result.lose .bv-result-title { color: #FF8A7A; }
.bv-result.draw .bv-result-title { color: var(--signal-warn); }
.bv-result-sides { display: grid; gap: 8px; margin-top: 10px; }
.bv-result-side { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 10px; }
.bv-result-side.mine { border-color: var(--text-2); }
.bv-result-side .list li { padding: 4px 0; }
.rep-watch { margin-left: 8px; flex: none; }
@media (min-width: 1024px) { .bv { left: 50%; right: auto; width: 480px; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* ---------- More screen tiles (skinned with ui:panel by skin.js) ---------- */
.screen { min-width: 0; max-width: 100%; }
.more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-tile { position: relative; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 76px; padding: 10px; overflow: hidden; }
.more-ic { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.more-ic .tile-art { width: 40px !important; height: 40px !important; }
.more-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.more-txt b { font-family: var(--font-head); font-size: 16px; }
.more-txt .small { color: var(--text-2); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.more-badge { position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; background: var(--signal-warn); color: #111; font: 700 12px/20px var(--font-num); text-align: center; font-style: normal; }
@media (min-width: 720px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Active Operations tracker ---------- */
.ops-fab { position: fixed; left: max(6px, env(safe-area-inset-left, 0px)); z-index: 6; width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(22,26,33,.92); border: 1px solid var(--line); color: var(--text-1); cursor: pointer; padding: 0; }
.ops-fab .ops-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; background: var(--signal-warn); color: #111; font: 700 12px/20px var(--font-num); }
.ops-mini { position: fixed; left: 64px; z-index: 6; width: min(250px, calc(100vw - 76px)); background: rgba(22,26,33,.9); border: 1px solid var(--line); padding: 2px 6px; }
.ops-mini-head, .ops-mini-row { display: flex; width: 100%; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-1); min-height: 30px; padding: 0 2px; cursor: pointer; font-size: 12px; text-align: left; }
.ops-mini-head { justify-content: space-between; color: var(--text-2); }
.ops-mini-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-dot { width: 8px; height: 8px; flex: none; background: var(--text-2); }
.ops-dot.out { background: #6FD3C8; } .ops-dot.work { background: var(--signal-warn); } .ops-dot.back { background: #8FE3B0; } .ops-dot.fight { background: #FF6A5A; }
.ops-panel h2 { margin: 0; }
.ops-body { display: grid; gap: 8px; }
.op-row { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 10px; display: grid; gap: 6px; }
.op-row.fight { border-color: #FF6A5A; }
.op-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.op-icon { flex: none; }
.op-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.op-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-ships { color: var(--text-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.op-phase { flex: none; font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); white-space: nowrap; }
.op-phase.out { color: #6FD3C8; border-color: #3B7F78; } .op-phase.work { color: var(--signal-warn); border-color: #8A6A20; }
.op-phase.back { color: #8FE3B0; border-color: #3E7E58; } .op-phase.fight { color: #FF8A7A; border-color: #9E3A2E; }
.op-prog { display: grid; gap: 3px; }
.op-row.out .bar > i { background: #6FD3C8; } .op-row.work .bar > i { background: var(--signal-warn); } .op-row.back .bar > i { background: #8FE3B0; } .op-row.fight .bar > i { background: #FF6A5A; }
.op-cargo { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.op-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.op-eta { flex: none; font-size: 13px; }
.op-row.slim { padding: 6px 10px; }
.op-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
