/* Daily quest uses the existing shared panel in portrait, landscape and desktop. */
.dq { max-width: 560px; margin: 0 auto; padding: 4px; color: #eadfca; }
.dq-card { padding: 20px; border: 1px solid #766040; border-radius: 12px; background: linear-gradient(145deg, #29251e, #181916); box-shadow: inset 0 1px 0 #9d80552b; }
.dq-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dq-kicker { color: #bdab8c; font-size: 13px; letter-spacing: .12em; }
.dq-state { white-space: nowrap; padding: 5px 9px; border: 1px solid #7c6b47; border-radius: 20px; font-size: 12px; color: #dbccaa; }
.dq-status-ready { color: #bcebc3; border-color: #5d8e66; background: #273b2a; }
.dq-status-claimed { color: #b3b9bb; border-color: #606568; }
.dq-status-review { color: #f1c397; border-color: #a17451; }
.dq-target { margin: 22px 0 12px; font-size: 24px; line-height: 1.4; overflow-wrap: anywhere; color: #f8e6c1; }
.dq-numbers { color: #b9ad96; font-size: 14px; margin-bottom: 10px; }
.dq-numbers b { color: #f4d291; font-size: 26px; font-variant-numeric: tabular-nums; }
.dq-progress { display: block; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 8px; overflow: hidden; background: #0e100f; }
.dq-progress::-webkit-progress-bar { background: #0e100f; }
.dq-progress::-webkit-progress-value { background: linear-gradient(90deg, #846534, #dbb96b); border-radius: 8px; }
.dq-progress::-moz-progress-bar { background: #c3a35c; }
.dq-reward { display: flex; align-items: center; gap: 12px; margin: 20px 0; padding: 14px 12px; border-radius: 8px; border: 1px solid #46565d; background: #1b262b; font-size: 15px; line-height: 1.5; }
.dq-gem { color: #9bd2e6; font-size: 28px; text-shadow: 0 0 10px #77c9e74d; }
.dq .dq-claim { min-height: 44px; width: 100%; border-radius: 8px; font-size: 15px; }
.dq .dq-claim:disabled { opacity: .6; cursor: default; }
.dq-message { padding: 12px; border-left: 3px solid #bd9b5f; color: #f3d4a7; line-height: 1.6; }
.dq-notes { padding: 8px 2px 0; color: #bfb5a3; font-size: 13px; line-height: 1.65; }
.dq-notes p { margin: 8px 0; }
@media (max-width: 480px) { .dq-card { padding: 16px; } .dq-target { font-size: 22px; } }
@media (orientation: landscape) and (max-height: 500px) { .dq-card { padding: 14px 18px; } .dq-target { margin: 12px 0 8px; } .dq-reward { margin: 12px 0; } }

#panel[data-panel="dailyquest"] #panel-body { background: #171b18; box-shadow: inset 0 0 12px #0004; }

html.land #panel .dq .dq-claim { min-height: 44px; }
/* The shared landscape rules use important declarations in this existing layer. */
@layer pc-panels {
  html.land #panel[data-panel="dailyquest"] { width: min(440px, var(--land-window-w)) !important; }
  html.land #panel[data-panel="dailyquest"] .dq-claim { min-height: 44px !important; height: auto !important; max-height: none !important; font-size: 15px !important; padding: 8px !important; }
}

@layer pc-panels {
  html.land #panel[data-panel="dailyquest"] .dq-target { font-size: 18px !important; line-height: 1.4 !important; }
  html.land #panel[data-panel="dailyquest"] .dq-numbers b { font-size: 22px !important; }
  html.land #panel[data-panel="dailyquest"] .dq-reward div { font-size: 14px !important; }
  html.land #panel[data-panel="dailyquest"] .dq-notes p { font-size: 13px !important; line-height: 1.6 !important; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .dq-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .dq-top { grid-column: 1 / -1; }
  .dq-target { grid-column: 1; grid-row: 2; margin: 0; }
  .dq-numbers { grid-column: 1; grid-row: 3; margin: 0; }
  .dq-progress { grid-column: 1; grid-row: 4; align-self: center; }
  .dq-reward { grid-column: 2; grid-row: 2 / 4; margin: 0; padding: 8px; gap: 8px; }
  .dq .dq-claim { grid-column: 2; grid-row: 4; }
}

/* 主導 11/14:電腦版共用面板高度依內容,任務卡被切到要捲才看得到「領取」→ 面板給固定高度 */
@layer pc-panels {
  html.land #panel[data-panel="dailyquest"] { height: min(600px, calc(100vh - 90px)) !important; max-height: none !important; }
}

/* 主導 11/15:獎勵用真實道具圖示 */
.dq-reward canvas.dq-icon { flex: none; border-radius: 6px; background: #0d1114; box-shadow: inset 0 0 0 1px #46565d; }

/* 主導 11/15:使用者「手機板 今日狩獵目標再小一點 空格太多」→ 手機直式收緊 */
@media (max-width: 480px) {
  .dq { padding: 0; }
  .dq-card { padding: 12px 14px; border-radius: 10px; }
  .dq-kicker { font-size: 12px; letter-spacing: .06em; }
  .dq-state { padding: 3px 8px; }
  .dq-target { margin: 8px 0 4px; font-size: 19px; line-height: 1.3; }
  .dq-numbers { margin-bottom: 6px; font-size: 13px; }
  .dq-numbers b { font-size: 21px; }
  .dq-progress { height: 8px; }
  .dq-reward { margin: 10px 0; padding: 8px 10px; gap: 10px; font-size: 14px; }
  .dq-notes { padding-top: 4px; font-size: 12px; line-height: 1.5; }
  .dq-notes p { margin: 4px 0; }
}

/* DailyQuestReroll: scoped additions leave the disabled-feature DOM unchanged. */
.dq-reroll-box { grid-column: 1 / -1; margin-top: 12px; }
.dq .dq-reroll { width: 100%; min-height: 44px; padding: 10px; font-size: 14px; white-space: normal; }
.dq-reroll-note { margin: 6px 0 0; color: #cfc2ab; font-size: 12px; line-height: 1.5; }
.dq-confirm { box-sizing: border-box; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; border: 1px solid #a88a56; border-radius: 12px; background: #20251f; color: #f3e5cc; box-shadow: 0 12px 60px #0009; }
.dq-confirm::backdrop { background: #000b; }
.dq-confirm h3 { margin: 0 0 12px; font-size: 20px; }
.dq-confirm p { font-size: 15px; line-height: 1.7; }
.dq-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dq-confirm-actions button { flex: 1 1 120px; min-height: 44px; padding: 10px; white-space: normal; }
@layer pc-panels {
  html.land #panel[data-panel="dailyquest"] .dq-reroll { min-height: 44px !important; height: auto !important; max-height: none !important; font-size: 14px !important; padding: 10px !important; }
}

/* 11/19 主導:手機直式停用的重骰鈕要看得出不能按(電腦 / 橫式原本就會變暗) */
.dq .dq-reroll:disabled, #panel[data-panel="dailyquest"] .dq-reroll:disabled { opacity: .5 !important; cursor: default; filter: grayscale(.6); }

/* DailyQuestSkip: clear full rows on narrow screens; alongside reroll where space permits. */
.dq-payments { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; grid-column: 1 / -1; margin-top: 12px; }
.dq-payments .dq-reroll-box { margin-top: 0; grid-column: auto; }
.dq .dq-skip { width: 100%; min-height: 44px; height: auto; padding: 10px; font-size: 14px; white-space: nowrap; }
.dq .dq-skip[aria-disabled="true"] { opacity: .5 !important; cursor: default; filter: grayscale(.6); }
@media (max-width: 480px) { .dq-payments { grid-template-columns: 1fr; gap: 8px; } }
@layer pc-panels {
 html.land #panel[data-panel="dailyquest"] .dq-skip { min-height: 44px !important; height: auto !important; max-height: none !important; font-size: 14px !important; padding: 10px !important; }
}
