:root {
  --bg: #eaf6ff;
  --bg2: #f7fbff;
  --card: #ffffff;
  --card2: #eef7ff;
  --line: #b9d7ef;
  --text: #102a43;
  --muted: #5b7a99;
  --orange: #ff9f43;
  --orange2: #ff7a18;
  --blue: #1c7ed6;
  --green: #2f9e44;
  --red: #e03131;
  --yellow: #f08c00;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  background:
    radial-gradient(900px 520px at 18% -8%, rgba(28,126,214,.20), transparent 60%),
    radial-gradient(760px 420px at 82% 0%, rgba(255,159,67,.14), transparent 62%),
    repeating-linear-gradient(115deg, rgba(28,126,214,.07) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #f7fcff 0%, #dcefff 55%, #c9e6ff 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 60px;
}
h1, h2 { font-weight: 700; letter-spacing: .5px; }
h2 { font-size: 17px; margin-bottom: 14px; }

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
  background:
    url("clouds.svg?v=4") repeat-x 0 100% / 560px 96px,
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(214,238,255,.92));
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(28,89,145,.06);
}
.topbar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  background: transparent; overflow: hidden;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 22px rgba(16,64,112,.28), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.logo img { width: 100%; height: 100%; display: block; }
.brand:hover .logo { transform: translateY(-1px) scale(1.02); box-shadow: 0 10px 26px rgba(16,64,112,.34); }
.brand h1 { font-size: 20px; }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.me-picker { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.me-picker select { min-width: 130px; }

/* tabs */
.tabs {
  display: flex; gap: 6px; padding: 14px 28px 0; max-width: 1180px; margin: 0 auto;
  overflow-x: auto;
}
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 10px 20px; border-radius: 12px 12px 0 0; cursor: pointer; font-size: 14px;
  font-weight: 600; white-space: nowrap; transition: .15s;
}
.tab:hover { color: var(--text); background: rgba(28,126,214,.07); }
.tab.active { color: var(--blue); background: var(--card); border-color: var(--line); border-bottom-color: var(--card); }

main { max-width: 1180px; margin: 0 auto; padding: 20px 28px; }
.panel { display: none; }
.panel.active { display: block; }

/* cards */
.card {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  box-shadow: 0 10px 30px rgba(28,89,145,.10);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,159,67,.18), transparent 70%);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--blue); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* buttons */
.btn {
  border: 1px solid var(--line); background: #f2f9ff; color: var(--text);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
  font-weight: 600; transition: .15s; font-family: inherit;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: linear-gradient(135deg, var(--orange), var(--orange2)); border: none; color: #1a1206; }
.btn.primary:hover { filter: brightness(1.08); color: #1a1206; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--red); border-color: rgba(255,107,107,.4); }
.btn.danger:hover { background: rgba(255,107,107,.12); border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea {
  background: #ffffff; border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-family: inherit;
  outline: none; transition: .15s; width: 100%;
}
input[type=checkbox] { accent-color: var(--orange); }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,159,67,.12); }
textarea { resize: vertical; }

/* table */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; color: var(--muted); font-size: 12px; font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid rgba(28,126,214,.14); }
.tbl tr:hover td { background: rgba(28,126,214,.05); }
.tbl tr:last-child td { border-bottom: none; }

/* badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px;
  font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.badge.job { background: rgba(77,171,247,.14); color: var(--blue); border-color: rgba(77,171,247,.3); }
.badge.role-會長 { background: rgba(255,159,67,.16); color: var(--orange); border-color: rgba(255,159,67,.35); }
.badge.role-副會長 { background: rgba(255,212,59,.14); color: var(--yellow); border-color: rgba(255,212,59,.3); }
.badge.role-幹部 { background: rgba(81,207,102,.14); color: var(--green); border-color: rgba(81,207,102,.3); }
.badge.role-成員 { background: rgba(139,150,181,.14); color: var(--muted); border-color: rgba(139,150,181,.3); }
.badge.ok { background: rgba(81,207,102,.14); color: var(--green); border-color: rgba(81,207,102,.3); }
.badge.pending { background: rgba(255,212,59,.14); color: var(--yellow); border-color: rgba(255,212,59,.3); }
.badge.rejected { background: rgba(255,107,107,.14); color: var(--red); border-color: rgba(255,107,107,.3); }
.badge.wait { background: rgba(139,150,181,.14); color: var(--muted); border-color: rgba(139,150,181,.3); }
.badge.closed { background: rgba(255,107,107,.12); color: var(--red); border-color: rgba(255,107,107,.3); }

/* raid cards */
.raid-list { display: flex; flex-direction: column; gap: 14px; }
.raid {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  border-left: 4px solid var(--orange);
}
.raid.done { border-left-color: var(--muted); opacity: .72; }
.raid-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.raid-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.raid-meta { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.raid-meta b { color: var(--text); font-weight: 600; }
.progress { height: 6px; background: #dcefff; border-radius: 99px; overflow: hidden; margin: 14px 0 10px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange2)); border-radius: 99px; transition: width .3s; }
.progress.full > i { background: linear-gradient(90deg, var(--red), #ff8787); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  display: inline-flex; align-items: center; gap: 6px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 12.5px;
}
.slot .x { cursor: pointer; color: var(--muted); font-weight: 700; padding: 0 4px; }
.slot-job { color: var(--muted); font-size: 11px; margin-left: 2px; }
.slot .x:hover { color: var(--red); }
.slot.empty { color: var(--muted); border-style: dashed; padding: 5px 12px; }
.slot.wait { border-color: rgba(255,212,59,.35); color: var(--yellow); }
.raid-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* list rows */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  flex-wrap: wrap;
}
.row .main { font-size: 14px; font-weight: 600; }
.row .meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.row .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.empty-state { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 10px; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,8,16,.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.modal .form { gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px);
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; opacity: 0;
  pointer-events: none; transition: .25s; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255,107,107,.5); color: var(--red); }
.toast.ok { border-color: rgba(81,207,102,.5); color: var(--green); }

/* ===== 每週報名 ===== */
.week-card { border-left: 4px solid var(--orange); }
.week-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.week-label { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.week-meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.week-meta b { color: var(--text); }
.week-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); background: rgba(255,159,67,.07); border-left: 2px solid rgba(255,159,67,.5); padding: 8px 12px; border-radius: 6px; }
.week-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.week-progress { margin-top: 16px; }
.cd { color: var(--orange); font-weight: 700; }

.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.boss-pick { background: #f4faff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bp-name { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.bp-diffs { display: flex; flex-direction: column; gap: 8px; }
.pick-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pick-extra { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.pick-char { width: auto; flex: 1; min-width: 110px; padding: 6px 8px; font-size: 12px; border-radius: 8px; }
label.check.mini { font-size: 11.5px; gap: 4px; color: var(--muted); white-space: nowrap; }
label.check.mini input { margin: 0; }
.enroll-target { display: flex; flex-direction: column; gap: 6px; }
.enroll-target select { max-width: 280px; }
.team-block { margin-top: 8px; }
.team-label { font-size: 11px; color: var(--muted); letter-spacing: .5px; margin-bottom: 5px; }
.slot-name { font-weight: 600; }
.slot-dc { font-size: 10.5px; color: var(--muted); background: rgba(139,150,181,.1); border-radius: 4px; padding: 1px 4px; }
.slot-job { color: var(--blue); font-size: 11px; }
.chip {
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px; transition: .15s;
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.on { background: linear-gradient(135deg, var(--orange), var(--orange2)); border-color: transparent; color: #1a1206; }
.chip.on[data-diff="困難"] { background: linear-gradient(135deg, #ff6b6b, #e03131); color: #fff; }
.me-line { font-size: 12.5px; color: var(--muted); }
.form-foot { display: flex; gap: 10px; flex-wrap: wrap; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
label.check input { width: auto; }
.hint { font-size: 12px; color: var(--muted); }
.badge.hard { background: rgba(255,107,107,.14); color: var(--red); border-color: rgba(255,107,107,.35); }

.roster { display: flex; flex-direction: column; gap: 12px; max-height: 640px; overflow-y: auto; padding-right: 6px; padding-bottom: 6px; }
.roster-row { border-bottom: 1px solid rgba(28,126,214,.16); padding-bottom: 12px; }
.roster-row:last-child { border-bottom: none; padding-bottom: 0; }
.roster-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.roster-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.roster-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.roster-count b { color: var(--text); }

/* ===== Discord / 多角色 ===== */
.user-box { display: flex; align-items: center; gap: 8px; }
.disc-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.disc-user img { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); }
.btn.discord { background: #5865f2; border: none; color: #fff; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.btn.discord:hover { filter: brightness(1.08); color: #fff; }
.dc-logo { background: rgba(255,255,255,.2); border-radius: 6px; padding: 1px 5px; font-size: 10px; letter-spacing: .5px; }
.dc-dot { font-size: 9px; font-weight: 800; color: #fff; background: #5865f2; padding: 2px 5px; border-radius: 5px; vertical-align: middle; }
.char-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.char-badges .badge b { color: var(--text); font-weight: 700; }
.chars-block { display: flex; flex-direction: column; gap: 8px; }
.chars-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); gap: 10px; }
.chars-head .btn { white-space: nowrap; flex-shrink: 0; }
#charRows { display: flex; flex-direction: column; gap: 8px; }
.char-row { display: grid; grid-template-columns: 1fr 96px 40px; gap: 8px; align-items: center; }
.char-row .c-level { text-align: center; }
.or-line { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0; position: relative; }
.or-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.or-line span { background: var(--card); padding: 0 10px; position: relative; }

/* ===== 固定團隊伍 ===== */
.ft-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ft-toolbar label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ft-toolbar select { width: auto; min-width: 150px; padding: 7px 10px; font-size: 12px; }
.ft-boss { margin-bottom: 24px; }
.ft-boss-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, #1c7ed6, #1864ab);
  color: #ffffff; font-weight: 800; letter-spacing: .5px;
}
.ft-boss-size { font-size: 11px; background: rgba(0,0,0,.18); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.ft-wrap { overflow-x: auto; border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; background: #ffffff; }
.ft-table { width: 100%; border-collapse: collapse; min-width: 900px; font-size: 12px; }
.ft-table th { background: linear-gradient(180deg,#1c7ed6,#1864ab); color: #ffffff; border: 1px solid #1864ab; padding: 6px 6px; font-weight: 700; white-space: nowrap; }
.ft-table td { border: 1px solid #cfe3f5; padding: 4px; vertical-align: top; }
.ft-no { width: 34px; text-align: center; color: var(--muted); font-weight: 700; }
.ft-table input { width: 100%; padding: 6px 7px; font-size: 12px; border-radius: 7px; background: #ffffff; border: 1px solid #cfe3f5; }
.ft-table input:focus { border-color: var(--orange); }
.ft-name { font-weight: 800; font-size: 11px; }
.ft-name { font-weight: 900 !important; letter-spacing: .2px; border-radius: 9px !important; transition: box-shadow .15s, filter .15s; }
.ft-c0 { background: linear-gradient(135deg,#f8fcff,#e8f5ff 62%,#f5fbff) !important; color: #0b4f8a !important; border: 1px solid #b9dcff !important; border-left: 4px solid #4dabf7 !important; }
.ft-c1 { background: linear-gradient(135deg,#fffbf3,#fff1de 62%,#fffaf2) !important; color: #7a4500 !important; border: 1px solid #ffd8a8 !important; border-left: 4px solid #ff9f43 !important; }
.ft-c2 { background: linear-gradient(135deg,#f7fff9,#e8fff0 62%,#f6fffa) !important; color: #1b6b3a !important; border: 1px solid #b2f2c4 !important; border-left: 4px solid #51cf66 !important; }
.ft-c3 { background: linear-gradient(135deg,#fbf8ff,#f2ebff 62%,#faf7ff) !important; color: #4b2a7a !important; border: 1px solid #d8c7ff !important; border-left: 4px solid #9775fa !important; }
.ft-c4 { background: linear-gradient(135deg,#fff9fb,#ffeff5 62%,#fff8fa) !important; color: #7a2f45 !important; border: 1px solid #ffc9d8 !important; border-left: 4px solid #ff8fab !important; }
.ft-c5 { background: linear-gradient(135deg,#f8feff,#e8fbff 62%,#f5feff) !important; color: #0b5c68 !important; border: 1px solid #b8eef5 !important; border-left: 4px solid #3bc9db !important; }
.ft-name { padding: 6px 8px !important; font-size: 12px !important; }
.ft-name:hover { filter: brightness(1.015); box-shadow: 0 3px 9px rgba(16,64,112,.12); }
.ft-name:focus { border-color: var(--orange) !important; box-shadow: 0 0 0 3px rgba(255,159,67,.14) !important; }
.team-tag { display: flex; align-items: center; gap: 6px; min-width: 0; }
.team-tag .ft-name { flex: 1; min-width: 0; }
.team-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(16,64,112,.18); }
.ft-dot-0 { background: #4dabf7; }
.ft-dot-1 { background: #ff9f43; }
.ft-dot-2 { background: #51cf66; }
.ft-dot-3 { background: #9775fa; }
.ft-dot-4 { background: #ff8fab; }
.ft-dot-5 { background: #3bc9db; }
.ft-slot { min-width: 78px; }
.ft-slot select { width: 100%; padding: 3px 4px; font-size: 10.5px; border-radius: 6px; background: #ffffff; border: 1px solid #cfe3f5; }
.ft-slot .ft-member { font-weight: 700; margin-bottom: 3px; }
.ft-slot .ft-job { color: var(--blue); }
.ft-remark { min-width: 84px; width: 84px; font-size: 11.5px; }
.ft-table .btn.sm { padding: 4px 6px; font-size: 11px; }
.ft-table th:last-child, .ft-table td:last-child { min-width: 80px; }
@media (max-width: 860px) { .ft-toolbar { width: 100%; } .ft-toolbar select { flex: 1; } }
.ft-teamname-cell { min-width: 132px; }
.ft-leader-cell { min-width: 64px; }
.ft-remark-cell { min-width: 84px; width: 86px; }
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange), var(--blue)); opacity: .55;
}

.ft-time-cell { min-width: 110px; }
.brand h1 {
  font-family: "Trebuchet MS", "Avenir Next", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #1864ab, #1c7ed6, #4dabf7, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(28,126,214,.18));
}
.ft-time-cell select { width: 100%; margin-bottom: 3px; font-size: 10px; padding: 3px 4px; border-radius: 6px; background: #fff; border: 1px solid #cfe3f5; }
.ft-time-cell select:last-child { margin-bottom: 0; }
.ft-actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.ft-off-toggle { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ft-off-toggle input { width: auto; }
.ft-off-badge { display: block; color: #e03131; font-weight: 800; font-size: 11px; margin-top: 3px; }
.ft-off-row { opacity: .62; }
.ft-off-row .ft-off-badge { opacity: 1; }
.ft-subrow td { border-top: none; }
.ft-boss-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ft-status { display: block; font-size: 10px; font-weight: 700; margin-top: 3px; padding: 1px 5px; border-radius: 4px; width: fit-content; }
.ft-status.carried { color: #1864ab; background: #e7f2ff; }
.ft-status.modified { color: #b35c00; background: #fff1e0; }
/* 臨時團 */
.tt-head { background: linear-gradient(90deg, #ff9f43, #ff7a18) !important; }
.tt-leader { width: 100%; padding: 3px 4px; font-size: 10.5px; border-radius: 6px; background: #fff; border: 1px solid #cfe3f5; }
.tt-status { margin-top: 3px; }
.tt-status .badge { font-size: 9px; padding: 1px 6px; }
.old-raids summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.old-raids summary::marker { color: var(--blue); }
.old-raids[open] summary { margin-bottom: 10px; }
.tt-level { font-size: 9px; color: var(--blue); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 會員管理 */
.member-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-tools input { width: 240px; max-width: 100%; }
.line-missing { color: #2f9e44; font-weight: 800; font-size: 12px; }
.badge.line-ok { background: rgba(47,158,68,.12); color: #2f9e44; border-color: rgba(47,158,68,.3); }
.enroll-target input { max-width: 280px; }
.week-picker { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.week-picker select { width: auto; min-width: 190px; padding: 7px 10px; font-size: 12px; }
/* 報名統計 */
.signup-stats { background: #f4faff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat-pills { display: flex; gap: 10px; margin-bottom: 10px; }
.stat-pill { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: center; }
.stat-pill b { display: block; font-size: 20px; color: var(--blue); }
.stat-pill span { font-size: 11px; color: var(--muted); }
.stat-title { font-size: 11px; color: var(--muted); font-weight: 700; margin: 8px 0 5px; letter-spacing: .5px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chip { font-size: 11px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }
.stat-chip b { color: var(--blue); }
.stat-bars { display: flex; flex-direction: column; gap: 4px; }
.stat-bar { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.stat-bar .bar { height: 6px; background: #dcefff; border-radius: 99px; overflow: hidden; }
.stat-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4dabf7, #1c7ed6); }
.stat-bar b { text-align: right; color: var(--text); }
/* 報名明細 / 候補 */
.signup-detail { margin-top: 10px; }
.detail-wrap { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.tbl.mini { font-size: 11px; }
.tbl.mini th, .tbl.mini td { padding: 6px 8px; }
.slot-toggle { border: 1px solid var(--line); background: #fff; color: var(--blue); border-radius: 6px; font-size: 9px; padding: 2px 5px; cursor: pointer; }
.slot-toggle:hover { border-color: var(--blue); }
.fixed-badge { background: rgba(28,126,214,.12); color: var(--blue); border-color: rgba(28,126,214,.3); }
.wait-slot { opacity: .85; }
/* 固定團候補／未填入 */
.candidate-list { margin-top: 8px; padding: 8px 10px; background: #fff8ee; border: 1px solid #ffd8a8; border-radius: 10px; }
.candidate-head { font-size: 11px; font-weight: 800; color: #b35c00; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.candidate-items { display: flex; flex-wrap: wrap; gap: 6px; }
.candidate { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #ffd8a8; border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 11px; }
.candidate .btn.sm { padding: 2px 6px; font-size: 10px; }
.candidate-empty { margin-top: 6px; font-size: 11px; color: var(--green); }
/* 報名名單收合 / 正取候補 */
.roster-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.roster-details summary { cursor: pointer; font-weight: 700; color: var(--text); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.roster-details summary::marker { color: var(--blue); }
.roster-details[open] summary { margin-bottom: 10px; }
.roster { max-height: 360px; }
.status-lines { text-align: left !important; font-size: 10px; line-height: 1.5; white-space: normal; min-width: 120px; }
.status-ok { color: #2f9e44; font-weight: 700; }
.status-wait { color: #e8590c; font-weight: 700; }
.status-fixed { color: var(--blue); font-weight: 700; }
.roster-details summary::before { content: "▸"; color: var(--blue); font-size: 12px; }
.roster-details[open] summary::before { content: "▾"; }
.roster-details summary:hover { color: var(--blue); }
.signup-char { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.signup-char label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.signup-char select { width: auto; min-width: 190px; padding: 7px 10px; font-size: 12px; }
.pick-extra { flex-wrap: wrap; }
.pick-team { width: auto; min-width: 78px; font-size: 10.5px; padding: 4px 6px; border-radius: 6px; }
.slot-team { font-size: 9px; color: #e8590c; font-weight: 800; }
/* 公會成���資料維護 */
.profile-search { margin-bottom: 14px; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.profile-search label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.profile-search input { max-width: 300px; }
.profile-search select { min-width: 180px; }
.profile-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 總覽：紙娃娃專欄＋遊戲公告 */
.dash-lower {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px;
  margin-top: 18px; align-items: start;
}
@media (max-width: 980px) { .dash-lower { grid-template-columns: 1fr; } }
.paperdoll-card, .news-card { min-width: 0; }
.paperdoll-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 12px;
}
.paperdoll-item {
  background: linear-gradient(180deg, #fff, #f2f9ff);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(28,89,145,.08);
}
.paperdoll-frame {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(77,171,247,.16), transparent 60%),
    repeating-linear-gradient(45deg, rgba(28,126,214,.04) 0 8px, transparent 8px 16px),
    #eef7ff;
  overflow: hidden;
}
.paperdoll-frame img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
  image-rendering: pixelated;
}
.paperdoll-fallback {
  display: none; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 11px;
}
.paperdoll-fallback span { font-size: 10px; }
.paperdoll-frame.no-image .paperdoll-fallback { display: flex; }
.paperdoll-info { padding: 9px 11px 11px; }
.paperdoll-name { font-size: 13px; font-weight: 800; }
.paperdoll-job { font-size: 11.5px; color: var(--blue); margin-top: 2px; }
.paperdoll-job b { color: var(--text); }
.paperdoll-note {
  font-size: 11px; color: var(--muted); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.paperdoll-empty { padding: 34px 10px; }
.paperdoll-empty-icon { font-size: 38px; margin-bottom: 6px; }
.paperdoll-edit {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px; background: var(--bg2); border: 1px dashed var(--line); border-radius: 12px;
}
.paperdoll-preview {
  min-height: 120px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.paperdoll-preview img { max-width: 100%; max-height: 220px; object-fit: contain; image-rendering: pixelated; }

.news-card { display: flex; flex-direction: column; }
.news-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.artale-news { display: flex; flex-direction: column; gap: 4px; }
.artale-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center;
  padding: 9px 10px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; color: var(--text); transition: .15s;
}
.artale-item:hover { background: var(--bg2); border-color: var(--line); }
.artale-item.pinned { background: rgba(255,159,67,.07); }
.artale-tag {
  font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 999px;
  white-space: nowrap; background: rgba(139,150,181,.14); color: var(--muted);
}
.artale-tag.update { background: rgba(28,126,214,.12); color: var(--blue); }
.artale-tag.event { background: rgba(47,158,68,.12); color: var(--green); }
.artale-tag.shop { background: rgba(255,159,67,.16); color: #d9480f; }
.artale-tag.maint { background: rgba(224,49,49,.12); color: var(--red); }
.artale-tag.sanction { background: rgba(112,72,232,.12); color: #6741d9; }
.artale-title {
  font-size: 12.5px; font-weight: 650; line-height: 1.4; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.artale-date { color: var(--muted); font-size: 11px; white-space: nowrap; }
.news-foot { margin-top: 10px; text-align: right; }
@media (max-width: 600px) {
  .artale-item { grid-template-columns: auto 1fr; }
  .artale-date { grid-column: 2; }
}
.paperdoll-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.paperdoll-edit input[type=file] { padding: 8px; background: #fff; }
.merit-field { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.paperdoll-item { position: relative; }
.paperdoll-add {
  min-height: 186px; border: 2px dashed var(--line); border-radius: 14px;
  background: rgba(255,255,255,.55); color: var(--blue); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-family: inherit; transition: .15s;
}
.paperdoll-add span { font-size: 38px; line-height: 1; font-weight: 300; }
.paperdoll-add small { font-size: 12px; color: var(--muted); font-weight: 700; }
.paperdoll-add:hover { border-color: var(--blue); background: #fff; box-shadow: 0 6px 18px rgba(28,89,145,.10); }
.paperdoll-remove {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(224,49,49,.35); background: rgba(255,255,255,.94);
  color: var(--red); cursor: pointer; font-size: 12px; line-height: 1;
  display: grid; place-items: center;
}
.paperdoll-remove:hover { background: var(--red); color: #fff; }
.paperdoll-empty { grid-column: 1 / -1; }
.paperdoll-add-empty { grid-column: 1 / -1; min-height: 220px; }
.paperdoll-add-empty strong { font-size: 15px; color: var(--text); }
/* RainClan 首頁：每週王團排程 */
.weekly-schedule { display: flex; flex-direction: column; gap: 10px; }
.week-schedule {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  background: linear-gradient(180deg, #fff, #f4faff);
}
.week-schedule-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.week-schedule-title { font-size: 13.5px; font-weight: 800; }
.week-schedule-range { color: var(--muted); font-size: 11px; margin-top: 2px; }
.week-boss-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 8px 0 2px;
  border-top: 1px dashed var(--line); margin-top: 7px;
}
.week-boss-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.week-boss-name { font-size: 12.5px; font-weight: 750; }
.week-boss-meta { color: var(--muted); font-size: 11px; line-height: 1.5; }
.week-boss-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lineup-modal { max-height: 64vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.lineup-boss h4 { font-size: 14px; margin-bottom: 8px; color: var(--blue); }
.lineup-team {
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px;
  background: var(--bg2); margin-bottom: 8px;
}
.lineup-team-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; margin-bottom: 7px;
}
.lineup-team-head b { font-size: 13px; }
.lineup-slots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px;
}
.lineup-slot {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  background: #fff; min-height: 42px;
}
.lineup-slot.empty { border-style: dashed; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.lineup-name { display: block; font-size: 12px; font-weight: 750; }
.lineup-job { display: block; color: var(--blue); font-size: 10.5px; margin-top: 1px; }
.modal.wide { max-width: 760px; }
.week-warning {
  margin-top: 8px; padding: 8px 10px; border-radius: 9px;
  background: #fff4e6; border: 1px solid #ffd8a8;
  color: #b35c00; font-size: 12px; font-weight: 750;
}
.boss-counts { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; position: relative; z-index: 1; }
.boss-count {
  font-size: 10.5px; color: var(--muted); background: rgba(28,126,214,.06);
  border: 1px solid rgba(28,126,214,.16); border-radius: 999px; padding: 2px 7px;
  white-space: nowrap;
}
.boss-count b { color: var(--blue); font-size: 11px; margin-left: 2px; }
/* 總覽：左側排程、右側請假明細 */
.dash-top { grid-template-columns: minmax(0, 1.75fr) minmax(250px, .85fr); align-items: start; }
@media (max-width: 900px) { .dash-top { grid-template-columns: 1fr; } }
.leave-line {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 4px; border-bottom: 1px dashed var(--line);
  font-size: 12px; min-width: 0;
}
.leave-line:last-of-type { border-bottom: none; }
.leave-name { font-weight: 800; white-space: nowrap; }
.leave-date { color: var(--muted); white-space: nowrap; }
.leave-reason {
  min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.leave-line .badge { margin-left: auto; flex: none; }
/* 總覽：公會活動 */
.activity-card { margin-top: 18px; }
.activity-list { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 2px; }
.activity-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: linear-gradient(180deg, #fff, #f7fcff);
}
.activity-main { min-width: 0; flex: 1; }
.activity-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 800; }
.activity-date {
  font-size: 10.5px; font-weight: 700; color: var(--blue);
  background: rgba(28,126,214,.08); border: 1px solid rgba(28,126,214,.16);
  border-radius: 999px; padding: 2px 8px;
}
.activity-content { margin-top: 6px; font-size: 13px; line-height: 1.75; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; }
@media (max-width: 700px) {
  .activity-item { flex-direction: column; }
  .activity-actions { align-self: flex-end; }
}
/* 總覽：雙欄排版 */
.dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
  gap: 18px; align-items: start;
}
.dashboard-main, .dashboard-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.activity-card { margin-top: 0; }
.dashboard-side .card { min-width: 0; }
@media (max-width: 980px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
.paperdoll-add-empty { min-height: 170px; }
/* 總覽統計卡：緊湊版 */
.stats { gap: 12px; margin-bottom: 16px; }
.stat { padding: 12px 14px; border-radius: 14px; }
.stat::after { width: 58px; height: 58px; right: -14px; top: -14px; }
.stat .num { font-size: 25px; line-height: 1.1; }
.stat .lbl { font-size: 12px; margin-top: 2px; }
.stat-members .num {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff9f43, #ff6b35);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff7a18;
}
.boss-counts { margin-top: 6px; gap: 3px 5px; }
.boss-count { font-size: 10px; padding: 1px 6px; }
.boss-count b { font-size: 10.5px; }
.stat-members .num {
  font-size: 34px;
  color: #f76707;
  background: none;
  -webkit-text-fill-color: #f76707;
  text-shadow: 0 3px 10px rgba(247, 103, 7, .16);
}
/* 固定團：成員換隊 */
.ft-slot { position: relative; }
.slot-swap {
  position: static; width: 100%; height: 16px; margin-top: 2px; padding: 0 2px;
  border-radius: 4px; border: 1px solid rgba(28,126,214,.30);
  background: rgba(255,255,255,.95); color: var(--blue);
  font-size: 9px; line-height: 1; cursor: pointer; display: block;
}
.slot-swap:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.ft-slot.swap-pending {
  outline: 2px solid var(--orange); outline-offset: -1px;
  background: #fff7eb; border-radius: 8px;
}
.ft-slot.swap-pending .slot-swap {
  background: var(--orange); color: #1a1206; border-color: var(--orange);
}
/* 固定團：每隊不同底色，方便分辨 */
.ft-table tr.ft-tone-0 td { background: #edf7ff; }
.ft-table tr.ft-tone-1 td { background: #fff2dc; }
.ft-table tr.ft-tone-2 td { background: #eaffef; }
.ft-table tr.ft-tone-3 td { background: #f2ecff; }
.ft-table tr.ft-tone-4 td { background: #ffedf2; }
.ft-table tr.ft-tone-5 td { background: #e8fbff; }
.ft-table tr.ft-tone-0 td:first-child { border-left: 4px solid #74c0fc; }
.ft-table tr.ft-tone-1 td:first-child { border-left: 4px solid #ffb86b; }
.ft-table tr.ft-tone-2 td:first-child { border-left: 4px solid #69db7c; }
.ft-table tr.ft-tone-3 td:first-child { border-left: 4px solid #b197fc; }
.ft-table tr.ft-tone-4 td:first-child { border-left: 4px solid #ff9eb5; }
.ft-table tr.ft-tone-5 td:first-child { border-left: 4px solid #66d9e8; }
/* 固定團／臨時團：隊長、隊員、職業字體加大置中 */
.ft-table .ft-leader,
.ft-table .tt-leader,
.ft-table .ft-member,
.ft-table .tt-member,
.ft-table .ft-job,
.ft-table .tt-job {
  text-align: center;
  text-align-last: center;
  font-weight: 800;
}
.ft-table .ft-leader,
.ft-table .tt-leader { font-size: 12.5px; }
.ft-table .ft-member,
.ft-table .tt-member { font-size: 12px; }
.ft-table .ft-job,
.ft-table .tt-job { font-size: 11.5px; }
.ft-table .tt-level { text-align: center; font-weight: 800; font-size: 10.5px; }
.ft-table .ft-slot select { padding: 4px 5px; }
.ft-leader-cell { min-width: 84px; }
.ft-slot { min-width: 88px; }
/* 未加入 LINE 群組：綠色字 */
.ft-table .no-line-member {
  color: #2f9e44 !important;
  font-weight: 900 !important;
}

.profile-new { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
/* 成員維護：每個職業各自的表功欄位 */
.char-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.char-row .p-job, .char-row .c-job { flex: 1 1 160px; min-width: 0; }
.char-row .p-level, .char-row .c-level { flex: 0 0 88px; text-align: center; }
.char-row .p-merit, .char-row .c-merit { flex: 1 1 220px; min-width: 0; }
.char-row .btn.sm { flex: 0 0 auto; }
.ft-table .line-ok-member {
  color: #102a43 !important;
  font-weight: 900 !important;
}
/* 固定王團成員：藍色字 */
.ft-table .fixed-member {
  color: #1c7ed6 !important;
  font-weight: 900 !important;
}
/* 固定團／臨時團：隊長與成員可輸入搜尋 */
.ft-slot .ft-member,
.ft-slot .tt-member {
  width: 100%; margin-bottom: 3px; padding: 4px 5px;
  border: 1px solid #cfe3f5; border-radius: 6px; background: #fff;
  color: #102a43; font-size: 12px; font-weight: 800; text-align: center;
}
.ft-slot .ft-member::placeholder,
.ft-slot .tt-member::placeholder { color: #9aa8c7; font-weight: 600; }
.tt-leader { font-size: 12px; font-weight: 800; text-align: center; }
/* 固定團隊長：金色底 */
.ft-table .ft-leader {
  background: linear-gradient(135deg,#fff9e8,#ffe7a3 62%,#fff6d8) !important;
  color: #5c4300 !important;
  border: 1px solid #e6c15a !important;
  border-left: 4px solid #d9a400 !important;
  border-radius: 9px !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(217,164,0,.14);
}
.ft-table .ft-leader:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px rgba(255,159,67,.16) !important;
}
/* 新進成員／成員維護：職業、等級、表功欄位分欄 */
.char-col-head {
  display: grid; grid-template-columns: minmax(130px,1fr) 76px 130px 32px;
  gap: 8px; align-items: center; padding: 0 2px;
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.char-row {
  display: grid; grid-template-columns: minmax(130px,1fr) 76px 130px 32px;
  gap: 8px; align-items: center;
}
.char-row .p-job, .char-row .c-job,
.char-row .p-level, .char-row .c-level,
.char-row .p-merit, .char-row .c-merit { width: 100%; min-width: 0; }
.char-row .p-level, .char-row .c-level { text-align: center; }
.char-row .btn.sm { width: 100%; padding: 6px 4px; }
@media (max-width: 480px) {
  .char-col-head { grid-template-columns: minmax(0,1fr) 70px 32px; }
  .char-col-head .col-merit, .char-col-head .col-remove { display: none; }
  .char-row { grid-template-columns: minmax(0,1fr) 70px 32px; }
  .char-row .p-merit, .char-row .c-merit { grid-column: 1 / 3; grid-row: 2; }
  .char-row .btn.sm { grid-column: 3; grid-row: 1 / span 2; }
}
/* 總覽陣容：使用固定團／臨時團表格樣式 */
.modal.wide { max-width: 980px; }
.lineup-table-wrap { margin: 6px 0 12px; }
.lineup-table-title {
  font-size: 12px; font-weight: 900; color: var(--blue);
  margin: 0 0 4px 2px; letter-spacing: .3px;
}
.lineup-table-title.temp { color: #d9480f; }
.lineup-table { min-width: 900px; }
.lineup-table .ft-name {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lineup-table .ft-teamname-cell { text-align: center; }
.lineup-table .ft-teamname-cell .badge { margin-top: 4px; font-size: 9px; }
.lineup-leader {
  display: block; min-height: 28px; padding: 5px 6px;
  border-radius: 8px; text-align: center; font-size: 12px; font-weight: 900;
}
.lineup-table .ft-time-cell { font-size: 11px; text-align: center; }
.lineup-slot { vertical-align: middle; text-align: center; min-width: 76px; }
.lineup-slot.empty { color: #9aa8c7; font-size: 11px; }
.lineup-member { font-weight: 900; font-size: 12px; }
.lineup-job { color: var(--blue); font-size: 10px; margin-top: 2px; }
/* 陣容表格的成員格：覆蓋舊 lineup 卡片樣式 */
.lineup-table .lineup-slot,
.lineup-table .lineup-slot.empty {
  display: table-cell; min-height: 0; padding: 4px;
  border: 1px solid #cfe3f5; border-radius: 0; background: transparent;
  place-items: unset; vertical-align: middle; text-align: center;
}
/* 出團通知 */
.notify-btn {
  padding: 5px 6px; font-size: 11px; border-radius: 8px; cursor: pointer;
  background: #f8f9fa; border: 1px solid #dee2e6; color: #868e96; filter: grayscale(1); opacity: .72;
  transition: filter .15s, opacity .15s, box-shadow .15s, transform .15s;
}
.notify-btn:hover { opacity: 1; filter: none; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(16,64,112,.14); }
.notify-btn.on { background: linear-gradient(180deg,#fffdf5,#fff6dc); border-color: #ffe08a; filter: none; opacity: 1; }
.notify-btn.due { background: linear-gradient(180deg,#fff9db,#ffe066); border-color: #f59f00; filter: none; opacity: 1; animation: notifyPulse 1.7s ease-out infinite; }
.notify-btn.sent { background: linear-gradient(180deg,#f4fff7,#d3f9d8); border-color: #8ce99a; filter: none; opacity: 1; }
@keyframes notifyPulse {
  0% { box-shadow: 0 0 0 0 rgba(245,159,0,.42); }
  70% { box-shadow: 0 0 0 6px rgba(245,159,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,159,0,0); }
}
.ft-notify-tag {
  display: inline-block; margin-top: 4px; font-size: 9.5px; font-weight: 800;
  padding: 1px 7px; border-radius: 999px; background: #f1f3f5; color: #868e96;
  border: 1px solid #dee2e6; white-space: nowrap;
}
.ft-notify-tag.on { background: #fff9db; color: #b35c00; border-color: #ffe066; }
.ft-notify-tag.due { background: #fff3bf; color: #a05000; border-color: #fab005; }
.ft-notify-tag.sent { background: #ebfbee; color: #2b8a3e; border-color: #8ce99a; }
.ft-notify-tag.off { background: #f8f9fa; color: #adb5bd; border-color: #e9ecef; }
.notify-form code { background: #f1f3f5; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.notify-type {
  font-size: 11px; font-weight: 700; line-height: 1.6; padding: 7px 10px;
  border-radius: 9px; background: #f4faff; border: 1px dashed #b9d7ef; color: #5b7a99;
}
.notify-type.webhook { background: #eefcf1; border-color: #8ce99a; color: #2b8a3e; }
.notify-type.link { background: #fff9e6; border-color: #ffe08a; color: #b35c00; }
.notify-type.bad { background: #fff5f5; border-color: #ffc9c9; color: #c92a2a; }
.notify-status { font-size: 11px; color: var(--muted); font-weight: 700; }
.notify-form textarea[name=preview] {
  font-size: 11.5px; line-height: 1.65; background: #f8fbff; color: #24415c;
  font-family: "Noto Sans TC", "Microsoft JhengHei", ui-monospace, monospace;
}
.notify-check { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.notify-check input { width: auto; }
.notify-form .modal-actions { flex-wrap: wrap; }
.modal.notify-wide { max-width: 620px; }
.notify-check { flex-direction: row !important; }
@media (max-width: 560px) {
  .notify-form .row2 { grid-template-columns: 1fr; }
  .modal.notify-wide { max-width: 100%; }
}
.ft-notify-tag.failed { background: #fff5f5; color: #c92a2a; border-color: #ffc9c9; }
.notify-btn.failed { background: linear-gradient(180deg,#fff5f5,#ffe3e3); border-color: #ffa8a8; filter: none; opacity: 1; }
.notify-quick { display: flex; justify-content: flex-end; }
/* 成員選擇器 */
.member-picker-pop {
  position: fixed; z-index: 90; display: none; max-height: 340px; overflow-y: auto;
  background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(16,64,112,.28); padding: 6px;
}
.member-picker-pop.show { display: block; }
.mp-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  font: inherit; color: var(--text); text-align: left;
}
.mp-item:hover, .mp-item.active { background: #e7f5ff; }
.mp-name { font-weight: 800; font-size: 12.5px; flex: 0 0 auto; white-space: nowrap; }
.mp-job { color: var(--blue); font-size: 10.5px; margin-left: auto; white-space: nowrap; flex: none; }
.mp-line {
  font-size: 9px; font-weight: 800; color: #2f9e44; background: #ebfbee;
  border: 1px solid #8ce99a; border-radius: 999px; padding: 0 5px; white-space: nowrap; flex: none;
}
.mp-clear { color: var(--muted); font-size: 11.5px; border-top: 1px dashed var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.mp-empty { padding: 14px 10px; text-align: center; color: var(--muted); font-size: 12px; }
/* 出團通知：Discord／LINE 分頁 */
.notify-panel { display: flex; flex-direction: column; gap: 12px; }
.notify-panel[hidden], .notify-panel [data-line-field][hidden] { display: none !important; }
/* 出團通知：多選標記成員 */
.mention-box {
  border: 1px solid var(--line); border-radius: 9px; background: #f8fbff;
  padding: 7px 10px;
}
.mention-box summary { cursor: pointer; font-size: 12px; font-weight: 800; color: var(--blue); }
.mention-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px;
  max-height: 190px; overflow-y: auto; padding-top: 8px;
}
.mention-item {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: 6px !important; font-size: 12px !important; color: var(--text) !important;
}
.mention-item input { width: auto; }
.mention-none { font-size: 11.5px; color: var(--muted); padding: 6px 0; }
@media (max-width: 560px) { .mention-list { grid-template-columns: 1fr; } }
/* 會員列表：Discord 獨立欄 */
.dc-name { font-size: 11px; color: var(--muted); margin-left: 5px; word-break: break-all; }
#memberBody td:first-child { white-space: nowrap; }
.dc-name {
  display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: middle;
}
/* 紙娃娃名稱 */
.paperdoll-title { font-size: 12.5px; font-weight: 900; color: #1864ab; margin-bottom: 2px; }
/* 公會活動：照片、地點、通知 */
.activity-photo { flex: 0 0 120px; width: 120px; height: 90px; border-radius: 9px; overflow: hidden; background: #eef7ff; border: 1px solid var(--line); }
.activity-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-location { margin-top: 4px; font-size: 12px; font-weight: 700; color: #e8590c; }
.activity-photo-preview { min-height: 100px; display: grid; place-items: center; background: #f8fbff; border: 1px dashed var(--line); border-radius: 10px; overflow: hidden; }
.activity-photo-preview img { max-width: 100%; max-height: 220px; object-fit: contain; }
@media (max-width: 700px) {
  .activity-photo { width: 100%; height: 150px; flex: none; }
}
/* 公會活動：快速範本 */
.activity-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.activity-templates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 總覽統計卡：公會牌風格（兔子吉祥物） */
.stat {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 214, 102, .18), transparent 28%),
    radial-gradient(circle at 16% 84%, rgba(56, 178, 172, .16), transparent 32%),
    radial-gradient(circle, rgba(160, 220, 255, .20) 1px, transparent 1.7px),
    linear-gradient(115deg, #0a2a44 0%, #103c57 46%, #1b2747 100%) !important;
  background-size: auto, auto, 26px 22px, auto;
  border: 3px solid #4dabf7 !important;
  box-shadow:
    0 0 0 2px #1864ab,
    0 10px 22px rgba(20, 50, 35, .28),
    0 0 18px rgba(77, 171, 247, .18),
    inset 0 0 0 2px rgba(180, 225, 255, .22) !important;
  color: #fff6dd;
}
.stat::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid rgba(180, 225, 255, .42);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.10));
  pointer-events: none;
}
.stat::after {
  content: "🐇";
  position: absolute; right: 10px; bottom: 2px;
  width: auto; height: auto; top: auto;
  border-radius: 0; background: none;
  font-size: 30px; line-height: 1;
  opacity: .24;
  filter: grayscale(1) brightness(2.4);
  transform: rotate(-6deg);
  pointer-events: none;
}
.stat .num, .stat-members .num {
  color: #ffd24d !important;
  background: none !important;
  -webkit-text-fill-color: #ffd24d !important;
  text-shadow: 0 2px 0 #6a3d12, 0 0 12px rgba(255, 210, 77, .25) !important;
  font-weight: 900;
}
.stat .lbl { color: #f3e4bf !important; font-weight: 700; }
.stat .boss-count {
  background: rgba(0, 0, 0, .18) !important;
  border-color: rgba(180, 225, 255, .3) !important;
  color: #dff3ff !important;
}
.stat .boss-count b { color: #ffd24d; }
.stat .hint { color: rgba(255, 245, 220, .72) !important; }
/* 公會標誌：雨嚕兔子 */
.logo img { object-fit: cover; }
/* LINE 群連結按鈕 */
.btn.line {
  background: linear-gradient(180deg, #06c755, #05a94a);
  border-color: #05a94a;
  color: #ffffff;
}
.btn.line:hover { color: #ffffff; filter: brightness(1.06); }
/* 頂部群組連結：質感按鈕與品牌圖示 */
#discordInviteBtn, #lineInviteBtn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 8px 14px; font-weight: 800;
  text-decoration: none; line-height: 1; white-space: nowrap;
  transition: transform .18s, box-shadow .18s, filter .18s, border-color .18s, color .18s;
}
#discordInviteBtn {
  background: linear-gradient(180deg, #ffffff, #f2f5ff);
  border: 1px solid #d4dcf5; color: #3945a8;
  box-shadow: 0 3px 10px rgba(40, 60, 120, .08);
}
#discordInviteBtn:hover {
  border-color: #5865F2; color: #3944bc;
  box-shadow: 0 6px 16px rgba(88, 101, 242, .18);
  transform: translateY(-1px);
}
#discordInviteBtn .ico { color: #5865F2; width: 18px; height: 14px; }
#lineInviteBtn {
  background: linear-gradient(180deg, #08d65c, #04a447);
  border: 1px solid #039a41; color: #ffffff;
  box-shadow: 0 4px 12px rgba(4, 164, 71, .22);
}
#lineInviteBtn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 16px rgba(4, 164, 71, .3);
  transform: translateY(-1px);
}
#lineInviteBtn .ico { color: #ffffff; }
.btn .ico { width: 16px; height: 16px; display: block; flex: none; }
.logo img { image-rendering: pixelated; }
/* 王團報名區：藍色質感橫幅 */
.card.week-card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(130, 195, 255, .38);
  border-left: 1px solid rgba(130, 195, 255, .38);
  border-radius: 18px;
  padding: 22px 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, .18), transparent 28%),
    radial-gradient(circle at 12% 110%, rgba(255, 159, 67, .20), transparent 34%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 15px),
    linear-gradient(135deg, #082b52 0%, #0f4f8c 46%, #1c7ed6 100%);
  box-shadow: 0 16px 38px rgba(8, 40, 80, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.week-card::after {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
  pointer-events: none;
}
.week-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; position: relative; z-index: 1;
}
.week-hero-main { flex: 1; min-width: 280px; }
.week-eyebrow {
  font-size: 10.5px; font-weight: 800; letter-spacing: 3px;
  color: rgba(210, 235, 255, .65); margin-bottom: 4px;
}
.week-card .week-label {
  font-size: 28px; font-weight: 900; letter-spacing: .3px;
  color: #ffffff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  text-shadow: 0 2px 12px rgba(0, 20, 45, .22);
}
.week-card .week-label .brand { color: #9ed2ff; font-weight: 800; letter-spacing: .6px; }
.week-card .badge {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .34);
  color: #ffffff;
  font-weight: 800;
}
.week-card .badge.ok { background: rgba(81, 207, 102, .24); border-color: rgba(140, 233, 154, .6); }
.week-card .badge.wait { background: rgba(255, 212, 59, .18); border-color: rgba(255, 224, 130, .5); }
.week-card .badge.closed, .week-card .badge.rejected { background: rgba(255, 107, 107, .2); border-color: rgba(255, 168, 168, .55); }
.week-card .week-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; color: rgba(255, 255, 255, .92); font-size: 15px;
}
.week-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 14px; font-weight: 700; color: #ffffff;
  backdrop-filter: blur(4px);
}
.week-chip.cd {
  background: rgba(255, 159, 67, .18);
  border-color: rgba(255, 193, 120, .45);
  color: #ffe08a;
}
.week-card .week-note {
  margin-top: 10px; font-size: 14px; line-height: 1.65;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .1);
  border-left: 3px solid #ffb86b;
  padding: 8px 12px; border-radius: 8px;
}
.week-card .week-actions {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-end;
  gap: 8px; flex-wrap: wrap; flex: 0 1 560px;
}
.week-card .week-picker { flex: 1 1 100%; justify-content: flex-end; }
.week-card .week-actions .btn { padding: 7px 12px; font-size: 12.5px; }
.week-card .week-picker { color: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 700; }
.week-card .week-picker select {
  background: rgba(255, 255, 255, .96);
  color: #0b3a6a; border: 1px solid rgba(255, 255, 255, .65);
  padding: 8px 12px; font-size: 14px; font-weight: 700; border-radius: 10px;
  min-width: 220px;
}
.week-card .btn {
  background: rgba(255, 255, 255, .14);
  color: #ffffff; border-color: rgba(255, 255, 255, .3);
  backdrop-filter: blur(4px);
}
.week-card .btn:hover {
  background: rgba(255, 255, 255, .24);
  color: #ffffff; border-color: #ffffff;
}
.week-card .btn.primary { background: #ffffff; color: #0b5c9e; border-color: #ffffff; }
.week-card .week-progress { margin-top: 18px; position: relative; z-index: 1; }
.week-card .progress {
  height: 10px; margin: 0; background: rgba(255, 255, 255, .18);
  border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 20, 45, .2);
}
.week-card .progress > i {
  background: linear-gradient(90deg, #ffd43b, #ff9f43);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 180, 60, .55);
}
.week-stats {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 600;
}
.week-stat-main { font-size: 15px; }
.week-stat-main b { font-size: 18px; color: #ffe08a; }
.week-stat-pill {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 3px 10px;
  font-size: 12.5px; color: rgba(255, 255, 255, .85);
}
.week-stat-pill b { color: #ffe08a; }
@media (max-width: 700px) {
  .card.week-card { padding: 18px; }
  .week-card .week-label { font-size: 23px; }
  .week-hero { gap: 14px; }
  .week-hero-main { min-width: 0; width: 100%; }
  .week-card .week-actions { width: 100%; flex-direction: column; align-items: stretch; flex: 1 1 100%; }
  .week-card .week-picker { flex: none; }
  .week-card .week-picker { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
  .week-card .week-picker select { width: 100%; min-width: 0; }
  .week-card .week-actions .btn { width: 100%; }
}
.week-cd { color: #ffe08a; font-weight: 800; margin-left: 3px; }
/* 報名表單王團卡：同步藍色質感 */
.boss-pick {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .16), transparent 30%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, #0a3159 0%, #12518f 58%, #1c7ed6 100%);
  border: 1px solid rgba(130, 195, 255, .42);
  border-radius: 13px;
  padding: 11px 12px;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(8, 40, 80, .18), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.boss-pick .bp-name {
  color: #ffffff; font-size: 14px; font-weight: 800;
  text-shadow: 0 1px 5px rgba(0, 20, 45, .2);
}
.boss-pick .badge {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #eaf6ff;
}
.boss-pick .badge.hard {
  background: rgba(255, 107, 107, .22);
  border-color: rgba(255, 168, 168, .5);
  color: #ffe3e3;
}
.boss-pick .chip {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .26);
  color: rgba(255, 255, 255, .92);
}
.boss-pick .chip:hover { border-color: #ffffff; color: #ffffff; }
.boss-pick .chip.on {
  background: linear-gradient(135deg, #ffd43b, #ff9f43);
  border-color: transparent;
  color: #3a2a00;
  box-shadow: 0 3px 10px rgba(255, 159, 67, .3);
}
.boss-pick .chip.on[data-diff="困難"] {
  background: linear-gradient(135deg, #ff8787, #e03131);
  color: #ffffff;
}
.boss-pick .pick-char,
.boss-pick .pick-team {
  background: rgba(255, 255, 255, .96);
  color: #0b3a6a;
  border: 1px solid rgba(255, 255, 255, .6);
}
.boss-pick label.check.mini { color: rgba(255, 255, 255, .85); }
/* 報名王團卡：淺藍版本 */
.boss-pick {
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, .8), transparent 32%),
    repeating-linear-gradient(115deg, rgba(28, 126, 214, .035) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, #f7fcff 0%, #e2f2ff 55%, #cfe8ff 100%);
  border: 1px solid #a9cff0;
  color: #0b3a6a;
  box-shadow: 0 6px 16px rgba(28, 126, 214, .10), inset 0 1px 0 #ffffff;
}
.boss-pick .bp-name { color: #0b3a6a; text-shadow: none; }
.boss-pick .badge {
  background: #e7f5ff;
  border: 1px solid #b9dcff;
  color: #1864ab;
}
.boss-pick .badge.hard {
  background: #fff0f0;
  border-color: #ffc9c9;
  color: #c92a2a;
}
.boss-pick .chip {
  background: #ffffff;
  border-color: #b9dcff;
  color: #1c5f9e;
}
.boss-pick .chip:hover { border-color: #1c7ed6; color: #1864ab; }
.boss-pick .chip.on { border-color: transparent; color: #3a2a00; }
.boss-pick .chip.on[data-diff="困難"] { border-color: transparent; color: #ffffff; }
.boss-pick .pick-char,
.boss-pick .pick-team {
  background: #ffffff;
  color: #0b3a6a;
  border: 1px solid #b9dcff;
}
.boss-pick label.check.mini { color: #5b7a99; }
/* 固定團／臨時團：與總覽、王團報名一致的藍色質感 */
.raid-panel {
  background:
    radial-gradient(circle at 92% 0%, rgba(77, 171, 247, .14), transparent 28%),
    radial-gradient(circle at 4% 100%, rgba(255, 159, 67, .08), transparent 30%),
    linear-gradient(180deg, #f8fcff, #eaf6ff);
  border-color: #b9dcff;
  box-shadow: 0 8px 24px rgba(28, 89, 145, .06);
}
.raid-panel .card-head {
  border-bottom: 1px dashed #cfe3f5;
  padding-bottom: 12px; margin-bottom: 14px;
}
.raid-panel .card-head h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; color: #0b3a6a;
  white-space: nowrap; flex: none;
}
.raid-panel .card-head h2::after {
  content: ""; width: 38px; height: 38px; flex: none;
  display: inline-block; border-radius: 50%;
  background: url("logo-rabbit.png?v=2") center / cover;
  border: 2px solid #4dabf7;
  box-shadow: 0 3px 8px rgba(28, 126, 214, .2);
}
.ft-boss {
  margin-bottom: 24px;
  border: 1px solid #cfe3f5;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdff, #f2f9ff);
  box-shadow: 0 6px 18px rgba(28, 89, 145, .06);
}
.ft-boss-head {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, #0f4f8c, #1c7ed6, #4dabf7);
}
.ft-boss-head::after {
  content: "🐇";
  position: absolute; right: 14px; bottom: -8px;
  font-size: 42px; line-height: 1; opacity: .13;
  filter: grayscale(1) brightness(2.4);
  transform: rotate(-8deg);
  pointer-events: none;
}
.tt-head {
  background: linear-gradient(90deg, #0f4f8c, #1c7ed6, #4dabf7) !important;
}
.ft-wrap {
  background: #fbfdff;
  border-color: #cfe3f5;
}
/* 成員維護／請假／會員：同步藍色面板 */
.theme-panel {
  background:
    radial-gradient(circle at 92% 0%, rgba(77, 171, 247, .14), transparent 28%),
    radial-gradient(circle at 4% 100%, rgba(255, 159, 67, .08), transparent 30%),
    linear-gradient(180deg, #f8fcff, #eaf6ff);
  border-color: #b9dcff;
  box-shadow: 0 8px 24px rgba(28, 89, 145, .06);
}
.theme-panel .card-head {
  border-bottom: 1px dashed #cfe3f5;
  padding-bottom: 12px; margin-bottom: 14px;
}
.theme-panel > h2 { color: #0b3a6a; }
/* 成員維護：縮短職業欄位，讓表單更緊湊 */
.char-col-head, .char-row {
  grid-template-columns: minmax(140px, 170px) 76px 130px 32px;
}
@media (max-width: 480px) {
  .char-col-head { grid-template-columns: minmax(0, 1fr) 70px 32px; }
  .char-row { grid-template-columns: minmax(0, 1fr) 70px 32px; }
}
/* 固定團／臨時團：隊伍名稱與列背景簡化，降低花俏感 */
.ft-table .ft-name {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  color: #102a43 !important;
  border: 1px solid #cfe3f5 !important;
  border-left: 3px solid #4dabf7 !important;
  font-weight: 800 !important;
}
.ft-table .ft-c0 { border-left-color: #4dabf7 !important; }
.ft-table .ft-c1 { border-left-color: #ff9f43 !important; }
.ft-table .ft-c2 { border-left-color: #51cf66 !important; }
.ft-table .ft-c3 { border-left-color: #9775fa !important; }
.ft-table .ft-c4 { border-left-color: #ff8fab !important; }
.ft-table .ft-c5 { border-left-color: #3bc9db !important; }
.ft-table tr.ft-tone-0 td,
.ft-table tr.ft-tone-1 td,
.ft-table tr.ft-tone-2 td,
.ft-table tr.ft-tone-3 td,
.ft-table tr.ft-tone-4 td,
.ft-table tr.ft-tone-5 td {
  background: #fbfdff;
}
.ft-table .team-dot { width: 8px; height: 8px; flex-basis: 8px; }
/* 報名表單：可打王時間 */
.enroll-availability {
  border: 1px solid #cfe3f5; border-radius: 10px;
  background: #f8fbff; padding: 9px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.ea-title { font-size: 12px; font-weight: 800; color: #1864ab; }
.ea-options { display: flex; gap: 12px; flex-wrap: wrap; }
.ea-options label.check.mini { font-size: 12px; }
.avail-cell { min-width: 118px; font-size: 10.5px; line-height: 1.5; white-space: normal; }
/* 各王團攻略 */
.guide-boss {
  border: 1px solid #b9dcff;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdff, #f2f9ff);
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(28, 89, 145, .06);
}
.guide-boss-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px;
  background: linear-gradient(90deg, #0f4f8c, #1c7ed6, #4dabf7);
  color: #ffffff; font-weight: 800; font-size: 14px;
}
.guide-count {
  font-size: 11px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 2px 8px; border-radius: 999px;
}
.guide-diff { padding: 10px 14px 2px; }
.guide-diff-title {
  font-size: 11px; font-weight: 800; color: #1c7ed6;
  letter-spacing: 1px; margin-bottom: 6px;
}
.guide-item {
  border: 1px solid #cfe3f5;
  border-left: 3px solid #4dabf7;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.guide-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-title { font-size: 14px; font-weight: 800; flex: 1; min-width: 160px; color: #102a43; }
.guide-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.guide-content {
  margin-top: 6px; font-size: 13.5px; line-height: 1.8;
  white-space: pre-wrap; overflow-wrap: anywhere; color: #24415c;
}
@media (max-width: 600px) {
  .guide-title { min-width: 0; }
  .guide-actions { width: 100%; }
}
/* 王團攻略：圖片與站位圖佔位 */
.guide-photo {
  margin-top: 8px; border: 1px solid #cfe3f5; border-radius: 9px;
  background: #f8fbff; overflow: hidden;
}
.guide-photo img { display: block; width: 100%; max-height: 380px; object-fit: contain; }
.guide-photo-preview {
  min-height: 110px; display: grid; place-items: center;
  background: #f8fbff; border: 1px dashed var(--line); border-radius: 10px; overflow: hidden;
}
.guide-photo-preview img { max-width: 100%; max-height: 280px; object-fit: contain; }
.guide-placeholder {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 14px 4px; padding: 12px 14px;
  border: 1px dashed #9dc9f0; border-radius: 10px; background: #f6fbff;
}
.gp-icon { font-size: 28px; }
.gp-title { font-size: 13.5px; font-weight: 800; color: #0b3a6a; }
.gp-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .guide-placeholder { align-items: flex-start; flex-wrap: wrap; }
  .gp-actions { width: 100%; margin-left: 0; }
}
.guide-author { font-size: 10.5px; font-weight: 600; color: #7a97b5; margin-left: 6px; }
.guide-meta { margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #5b7a99; }
/* 王團隊伍分配：王團篩選 */
.guide-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-filter {
  border: 1px solid #b9dcff; background: #ffffff; color: #1c5f9e;
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.guide-filter:hover { border-color: #4dabf7; background: #f2f9ff; }
.guide-filter.on {
  background: linear-gradient(135deg, #1c7ed6, #4dabf7);
  border-color: #1c7ed6; color: #ffffff;
  box-shadow: 0 4px 10px rgba(28, 126, 214, .2);
}
/* 總覽公會成員卡：趣味資訊 */
.stat-fun {
  margin-top: 6px; display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; font-size: 11px; font-weight: 700; color: #cfe9ff;
}
.stat-fun-icon { font-size: 14px; filter: grayscale(1) brightness(2.5); opacity: .95; }
.stat-fun-dot { opacity: .45; }
.stat-quote {
  margin-top: 4px; font-size: 10.5px; font-weight: 700;
  color: #ffe08a; opacity: .92; letter-spacing: .2px;
}
/* 總覽待審請假：簽核選單 */
.leave-sign {
  margin-left: auto; flex: none;
  font-family: inherit; font-size: 11px; font-weight: 700;
  color: #1c5f9e; background: #ffffff; border: 1px solid #b9dcff;
  border-radius: 7px; padding: 3px 5px; cursor: pointer;
}
.leave-sign:hover { border-color: #4dabf7; }
/* 總覽本週王團卡：趣味資訊 */
.stat-fun b { color: #ffe08a; }
.stat-mini-bar {
  margin-top: 6px; height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 2px rgba(0, 20, 45, .18);
}
.stat-mini-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffd43b, #ff9f43);
  box-shadow: 0 0 10px rgba(255, 180, 60, .45);
}
/* 總覽：請假狀態合併卡 */
.stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.leave-nums { display: flex; align-items: flex-end; gap: 12px; }
.leave-num { display: flex; flex-direction: column; line-height: 1; }
.leave-num b {
  font-size: 28px; font-weight: 900; color: #ffd24d;
  text-shadow: 0 2px 0 #6a3d12, 0 0 12px rgba(255, 210, 77, .22);
}
.leave-num span { font-size: 11px; font-weight: 700; color: #cfe9ff; margin-top: 5px; }
.leave-sep { width: 1px; height: 36px; background: rgba(255, 255, 255, .22); align-self: center; }
.stat-leave .lbl { margin-top: 8px; }
