/* =========================================================
   job-nav：不要橫向捲動，縮小自動換行
   ========================================================= */
.job-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    margin: 10px 0 18px 0;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;

    overflow: visible;
    white-space: normal;
}

.job-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;

    color: #e9e9e9;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.job-nav a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .14);
}

.job-nav a.active {
    background: rgba(255, 204, 102, .95);
    border-color: rgba(255, 204, 102, 1);
    color: #111;
    box-shadow: 0 6px 18px rgba(255, 204, 102, .22);
}

/* 手機：改成 grid 讓按鈕整齊、並且不會再出現多餘空白 */
@media (max-width: 768px) {
    .job-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .job-nav a {
        padding: 10px 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .job-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffd27f;
}

/* =========================================================
   Table（桌機總覽）
   ========================================================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .08);
}

.wiki-table thead th {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-weight: 800;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    text-align: center;
    white-space: nowrap;
}

.wiki-table tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    vertical-align: middle;
}

.wiki-table tbody tr:hover {
    background: rgba(255, 255, 255, .04);
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

/* =========================================================
   job-tag
   ========================================================= */
.job-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    white-space: nowrap;
}

.job-tag.royal {
    background: rgba(255, 204, 102, .14);
    border-color: rgba(255, 204, 102, .28);
}

.job-tag.knight {
    background: rgba(140, 200, 255, .14);
    border-color: rgba(140, 200, 255, .28);
}

.job-tag.elf {
    background: rgba(120, 255, 170, .14);
    border-color: rgba(120, 255, 170, .28);
}

.job-tag.mage {
    background: rgba(190, 150, 255, .14);
    border-color: rgba(190, 150, 255, .28);
}

.job-tag.darkelf {
    background: rgba(255, 140, 160, .14);
    border-color: rgba(255, 140, 160, .28);
}

.job-tag.dragon {
    background: rgba(255, 170, 120, .14);
    border-color: rgba(255, 170, 120, .28);
}

.job-tag.illusion {
    background: rgba(200, 200, 200, .14);
    border-color: rgba(200, 200, 200, .28);
}

/* =========================================================
   stars（上手度 bar）
   你已改成：<div class="stars-wrap"><span class="stars" style="width:xx%"></span></div>
   ========================================================= */
.stars-wrap {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .10);
    overflow: hidden;
}

.stars {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 204, 102, .95), rgba(255, 120, 90, .92));
}

/* =========================================================
   btn-go
   ========================================================= */
.btn-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    text-decoration: none;
    color: #111;
    background: rgba(255, 204, 102, .92);
    border: 1px solid rgba(255, 204, 102, .95);
    box-shadow: 0 6px 16px rgba(255, 204, 102, .16);
    transition: transform .12s ease, filter .12s ease;
}

.btn-go:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

/* =========================================================
   overview：桌機表格 / 手機卡片
   ========================================================= */
.overview-cards {
    display: none;
    /* 桌機先隱藏 */
}

.job-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px;
}

.job-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.job-card-top .stars-wrap {
    flex: 1 1 auto;
    min-width: 110px;
}

.job-card-desc {
    margin-top: 10px;
    color: rgba(233, 233, 233, .75);
    line-height: 1.6;
    font-size: 14px;
}

/* 手機：隱藏表格，改顯示卡片 */
@media (max-width: 768px) {
    .overview-table {
        display: none;
    }

    .overview-cards {
        display: grid;
        gap: 12px;
    }

    .info-section {
        padding: 12px;
    }

    .btn-go {
        width: 32px;
        height: 32px;
    }
}

/* 小工具（你頁面中有用到） */
.note {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(233, 233, 233, .75);
}

.text-green {
    color: #7CFFB0;
}

.text-red {
    color: #FF7A7A;
}

.text-gold {
    color: #FFD27F;
}

.text-blue {
    color: #7FB7FF;
}

.highlight {
    color: #ffd27f;
    font-weight: 800;
}




/* =========================================================
   Royal（王族）區塊
   ========================================================= */

.royal-hero {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 14px;
}

.royal-hero-left {
    flex: 1 1 auto;
    min-width: 0;
}

.royal-hero-right {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    margin-bottom: 10px;
    white-space: nowrap;
}

.pill-gold {
    background: rgba(255, 204, 102, .14);
    border-color: rgba(255, 204, 102, .28);
    color: #ffd27f;
}

.royal-desc {
    color: rgba(233, 233, 233, .80);
    line-height: 1.65;
    font-size: 14px;
}

.royal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.meta-item {
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 10px;
}

.meta-k {
    font-size: 12px;
    color: rgba(233, 233, 233, .65);
    margin-bottom: 6px;
}

.meta-v {
    font-weight: 800;
    color: #fff;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;

    color: #111;

    background: rgba(255, 204, 102, .92);
    border: 1px solid rgba(255, 204, 102, .95);
    box-shadow: 0 6px 16px rgba(255, 204, 102, .16);
    transition: transform .12s ease, filter .12s ease;
}

.link-btn:hover,
.link-btn:focus {
    color: #111 !important;
    transform: translateY(-1px);
    filter: brightness(1.03);
}


.royal-block {
    margin-top: 14px;
}

.sub-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 10px 0;
    font-size: 16px;
    font-weight: 800;
    color: #ffd27f;
}

.royal-growth {
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px;
}

.royal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.royal-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
}

.royal-list .k {
    color: rgba(233, 233, 233, .85);
    font-weight: 700;
}

.royal-list .v {
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
}

.royal-notes {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.note-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    line-height: 1.55;
}

.note-line.ok {
    color: #7CFFB0;
}

.note-line.warn {
    color: #FF7A7A;
}

.royal-callout {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .22);
    margin-bottom: 12px;
}

.callout-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 204, 102, .18);
    border: 1px solid rgba(255, 204, 102, .28);
    color: #ffd27f;
    flex: 0 0 auto;
}

.callout-title {
    font-weight: 900;
    margin-bottom: 4px;
}

.callout-text {
    color: rgba(233, 233, 233, .85);
    line-height: 1.6;
}

.callout-text.muted {
    color: rgba(233, 233, 233, .65);
    font-size: 13px;
}

.fund-table tbody td {
    text-align: center;
}

.row-highlight td {
    background: rgba(255, 204, 102, .10);
}

/* 手機：排版更緊湊、右側連結改成兩顆並排 */
@media (max-width: 768px) {
    .royal-hero {
        flex-direction: column;
    }

    .royal-hero-right {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .royal-meta {
        grid-template-columns: 1fr;
    }

    .royal-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .royal-list .v {
        white-space: normal;
    }
}

/* =========================================================
   Knight（騎士）區塊：沿用你現有設計系統
   ========================================================= */
.knight-hero {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 14px;
}

.knight-hero-left {
    flex: 1 1 auto;
    min-width: 0;
}

.knight-hero-right {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.knight-desc {
    color: rgba(233, 233, 233, .80);
    line-height: 1.65;
    font-size: 14px;
    margin: 0;
}

/* pill 顏色擴充（不影響 pill-gold） */
.pill-blue {
    background: rgba(127, 183, 255, .14);
    border-color: rgba(127, 183, 255, .28);
    color: #7FB7FF;
}

.pill-green {
    background: rgba(124, 255, 176, .14);
    border-color: rgba(124, 255, 176, .28);
    color: #7CFFB0;
}

.skill-icon {
    display: inline-block;
    vertical-align: middle;
}

/* 手機：與 Royal 同邏輯 */
@media (max-width: 768px) {
    .knight-hero {
        flex-direction: column;
    }

    .knight-hero-right {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   Elf（妖精）區塊：沿用現有系統
   ========================================================= */
.elf-hero {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 14px;
}

.elf-hero-left {
    flex: 1 1 auto;
    min-width: 0;
}

.elf-hero-right {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.elf-desc {
    color: rgba(233, 233, 233, .80);
    line-height: 1.65;
    font-size: 14px;
    margin: 0;
}

/* pill 顏色擴充（若你之前已加過 pill-green/blue 可略過） */
.pill-red {
    background: rgba(255, 122, 122, .14);
    border-color: rgba(255, 122, 122, .28);
    color: #FF7A7A;
}

/* 手機：與 Royal / Knight 同邏輯 */
@media (max-width: 768px) {
    .elf-hero {
        flex-direction: column;
    }

    .elf-hero-right {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   Mage（法師）區塊：沿用現有系統
   ========================================================= */
.mage-hero {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 14px;
}

.mage-hero-left {
    flex: 1 1 auto;
    min-width: 0;
}

.mage-hero-right {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.mage-desc {
    color: rgba(233, 233, 233, .80);
    line-height: 1.65;
    font-size: 14px;
    margin: 0;
}

/* pill 紫色 */
.pill-purple {
    background: rgba(190, 150, 255, .14);
    border-color: rgba(190, 150, 255, .28);
    color: #BE96FF;
}

/* 圖片容器 */
.img-frame {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .18);
}

.img-fluid {
    max-width: 100%;
    height: auto;
    /* 保持比例 */
    display: block;
}

/* 召喚 GIF */
.summon-gif {
    max-width: 120px;
    height: auto;
}

/* 手機：與 Royal / Knight / Elf 同邏輯 */
@media (max-width: 768px) {
    .mage-hero {
        flex-direction: column;
    }

    .mage-hero-right {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
  table.wiki-table.mage-stack {
    border: 0;
    background: transparent;
  }

  table.wiki-table.mage-stack thead {
    display: none;
  }

  table.wiki-table.mage-stack,
  table.wiki-table.mage-stack tbody,
  table.wiki-table.mage-stack tr,
  table.wiki-table.mage-stack td {
    display: block;
    width: 100%;
  }

  table.wiki-table.mage-stack tr {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
  }

  table.wiki-table.mage-stack td {
    padding: 8px 0;
    border: 0;
    text-align: left !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  table.wiki-table.mage-stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(233, 233, 233, .65);
  }

  table.wiki-table.mage-stack img {
    max-width: 100%;
    height: auto;
  }
}

/* =========================================================
   Dark Elf（黑妖）區塊：沿用現有系統
   ========================================================= */
.darkelf-hero{
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 14px;
}

.darkelf-hero-left{
  flex: 1 1 auto;
  min-width: 0;
}

.darkelf-hero-right{
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.darkelf-desc{
  color: rgba(233, 233, 233, .80);
  line-height: 1.65;
  font-size: 14px;
  margin: 0;
}

/* 手機：按鈕改 2 欄並排，版面更緊湊 */
@media (max-width: 768px){
  .darkelf-hero{ flex-direction: column; }

  .darkelf-hero-right{
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Dragon Knight（龍騎士）區塊
   ========================================================= */
.dragon-hero{
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 14px;
}

.dragon-hero-left{
  flex: 1 1 auto;
  min-width: 0;
}

.dragon-hero-right{
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.dragon-desc{
  color: rgba(233, 233, 233, .80);
  line-height: 1.65;
  font-size: 14px;
  margin: 0;
}

/* pill 橘色（若你已經有 pill-orange 可略過） */
.pill-orange{
  background: rgba(255, 170, 120, .14);
  border-color: rgba(255, 170, 120, .28);
  color: #FFAA78;
}

/* 弱點曝光內容：行距稍微拉開 */
.skill-lines{
  display: grid;
  gap: 6px;
}

/* 手機：按鈕改 2 欄並排 */
@media (max-width: 768px){
  .dragon-hero{ flex-direction: column; }

  .dragon-hero-right{
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Illusionist（幻術師）區塊
   ========================================================= */
.illusion-hero{
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 14px;
}

.illusion-hero-left{
  flex: 1 1 auto;
  min-width: 0;
}

.illusion-hero-right{
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.illusion-desc{
  color: rgba(233, 233, 233, .80);
  line-height: 1.65;
  font-size: 14px;
  margin: 0;
}

/* pill 灰色（幻術師用） */
.pill-gray{
  background: rgba(200, 200, 200, .14);
  border-color: rgba(200, 200, 200, .28);
  color: rgba(233, 233, 233, .92);
}

/* 手機：按鈕改 2 欄並排 */
@media (max-width: 768px){
  .illusion-hero{ flex-direction: column; }

  .illusion-hero-right{
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 警示區塊樣式 */
.job-danger-zone {
    background: rgba(215, 58, 73, 0.1); /* 淡淡的紅底 */
    border: 1px solid #d73a49;          /* 紅色邊框 */
    color: #f85149;                     /* 亮紅字 */
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.job-danger-zone i {
    font-size: 1.2rem;
}

.job-danger-zone strong {
    display: block;
    margin-bottom: 2px;
    text-decoration: underline;
}