html[data-app-route="quests"],
html[data-app-route="quests"] body { width: 100%; height: 100%; overflow: hidden; }

.quest-workspace {
  --quest-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --quest-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --quest-olive: #a8ba38;
  --quest-olive-dark: #647019;
  --quest-paper: #e9dfc6;
  --quest-muted: #aaa799;
  position: fixed;
  z-index: 112;
  inset: 0;
  display: grid;
  min-width: 0;
  grid-template-rows: var(--app-header-height, 94px) minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 2%, rgba(168, 186, 56, .14), transparent 32rem),
    linear-gradient(145deg, #11150d, #050605 62%);
  color: #f0ebdf;
  font-family: var(--quest-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.quest-workspace button { font-family: var(--quest-body); }
.quest-header {
  position: relative;
  z-index: 4;
  display: flex;
  height: var(--app-header-height, 94px);
  min-height: var(--app-header-height, 94px);
  max-height: var(--app-header-height, 94px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 1.5vw, 28px);
  padding: 0 clamp(18px, 2.2vw, 42px);
  border-bottom: 1px solid rgba(231, 220, 197, .16);
  background: rgba(7, 9, 6, .985);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .36);
}
.quest-brand { display: flex; min-width: 0; align-items: center; gap: clamp(10px, 1vw, 16px); color: inherit; text-decoration: none; }
.quest-brand img { width: var(--app-brand-icon-size, 58px); height: var(--app-brand-icon-size, 58px); flex: 0 0 var(--app-brand-icon-size, 58px); object-fit: contain; }
.quest-brand div { min-width: 0; }
.quest-brand strong { display: block; overflow: hidden; font: 700 clamp(22px, 1.75vw, 34px)/1 var(--quest-display); text-overflow: ellipsis; white-space: nowrap; }
.quest-brand span { display: block; margin-top: 5px; color: var(--quest-olive); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.quest-header-nav { display: flex; min-width: 0; height: 100%; align-items: stretch; justify-content: center; }
.quest-header-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; }
.quest-header-actions .language-toggle { height: var(--app-header-control-height, 48px); min-height: var(--app-header-control-height, 48px); }
.quest-account-button {
  display: inline-flex;
  min-width: 130px;
  height: var(--app-header-control-height, 48px);
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid rgba(232, 224, 203, .2);
  border-radius: 7px;
  background: #11140e;
  color: #e9e4d7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.quest-account-button:hover, .quest-account-button:focus-visible { border-color: var(--quest-olive); background: #1c2214; }
.quest-account-button img { width: 29px; height: 29px; border-radius: 50%; object-fit: cover; }
.quest-account-button[data-has-avatar="true"] > i { display: none; }

.quest-scroll { min-height: 0; overflow: auto; scrollbar-color: rgba(185, 201, 66, .55) rgba(255, 255, 255, .04); }
.quest-main { width: min(100%, 1880px); min-height: calc(100dvh - var(--app-header-height, 94px) - 55px); margin: 0 auto; padding: clamp(16px, 1.7vw, 30px); }
.quest-hero {
  position: relative;
  display: grid;
  min-height: clamp(190px, 22vh, 245px);
  grid-template-columns: minmax(0, 1fr) minmax(270px, .3fr);
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
  padding: clamp(25px, 3.2vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(205, 190, 137, .25);
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(90deg, rgba(4, 6, 3, .96), rgba(5, 7, 4, .58) 58%, rgba(5, 7, 4, .8)),
    url("/assets/command-safehouse-20260807.png") center 55% / cover;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .34);
}
.quest-hero::after { position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--quest-olive), transparent 68%); content: ""; }
.quest-hero > div, .quest-hero > aside { position: relative; z-index: 1; }
.quest-hero p, .quest-board > header span, .quest-history > header span, .quest-set-bonus > div > span { margin: 0 0 12px; color: var(--quest-olive); font-size: clamp(11px, .8vw, 14px); font-weight: 850; letter-spacing: .11em; }
.quest-hero p { display: flex; align-items: center; gap: 9px; }
.quest-hero h1 { max-width: 900px; margin: 0; color: #f4eee1; font: 700 clamp(38px, 4vw, 62px)/.96 var(--quest-display); letter-spacing: -.02em; }
.quest-hero > div > span { display: block; max-width: 760px; margin-top: 13px; color: #d1cabc; font-size: clamp(15px, 1vw, 18px); line-height: 1.45; }
.quest-reset { display: flex; min-width: 270px; align-items: center; gap: 17px; padding: 18px 20px; border: 1px solid rgba(168, 186, 56, .48); border-radius: 8px; background: rgba(10, 14, 7, .92); box-shadow: 0 16px 32px rgba(0, 0, 0, .28); }
.quest-reset > i { color: var(--quest-olive); font-size: 32px; }
.quest-reset div { display: grid; gap: 4px; }
.quest-reset span, .quest-reset small { color: #b6b3a4; font-size: 10px; font-weight: 850; letter-spacing: .09em; }
.quest-reset strong { color: #f4eee1; font: 700 clamp(29px, 2vw, 37px)/1 var(--quest-display); letter-spacing: .035em; }
.quest-reset[data-urgent] { border-color: #d0a34d; background: rgba(48, 34, 12, .94); }

.quest-guest {
  display: grid;
  grid-template-columns: minmax(220px, .52fr) minmax(320px, 1fr) minmax(300px, .8fr);
  align-items: center;
  gap: clamp(28px, 4vw, 70px);
  padding: clamp(34px, 5vw, 76px);
  border: 1px solid rgba(231, 220, 197, .15);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(110deg, rgba(22, 27, 17, .98), rgba(12, 15, 10, .98));
}
.quest-guest-art { display: grid; min-height: 250px; place-items: center; border: 1px solid rgba(168, 186, 56, .25); border-radius: 8px; background: repeating-linear-gradient(-45deg, rgba(168, 186, 56, .05) 0 1px, transparent 1px 10px); }
.quest-guest-art i { color: var(--quest-olive); font-size: clamp(80px, 10vw, 150px); opacity: .82; }
.quest-guest > div:nth-child(2) > span { color: #b5a968; font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.quest-guest h2 { max-width: 720px; margin: 10px 0 15px; font: 700 clamp(33px, 3.3vw, 57px)/1.02 var(--quest-display); }
.quest-guest p { max-width: 720px; margin: 0; color: #bdb8ab; font-size: clamp(15px, 1vw, 18px); line-height: 1.7; }
.quest-guest button { display: inline-flex; min-height: 54px; align-items: center; gap: 11px; margin-top: 25px; padding: 0 23px; border: 1px solid #9ead32; border-radius: 5px; background: linear-gradient(#829120, #616d16); color: #fff; cursor: pointer; font-size: 13px; font-weight: 850; letter-spacing: .04em; }
.quest-guest button:hover { filter: brightness(1.13); }
.quest-family-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid rgba(231, 220, 197, .13); border-radius: 8px; background: rgba(5, 7, 4, .38); }
.quest-family-list li { display: flex; min-height: 52px; align-items: center; gap: 13px; padding: 0 18px; border-bottom: 1px solid rgba(231, 220, 197, .09); color: #d6d0c3; font-size: 14px; font-weight: 700; }
.quest-family-list li:last-child { border-bottom: 0; }
.quest-family-list i { width: 24px; color: var(--quest-olive); font-size: 18px; text-align: center; }

.quest-dashboard { display: grid; gap: clamp(16px, 1.5vw, 24px); margin-top: clamp(14px, 1.3vw, 20px); }
.quest-profile-strip { display: grid; grid-template-columns: minmax(250px, 1.15fr) repeat(3, minmax(180px, .75fr)); border: 1px solid rgba(231, 220, 197, .14); border-radius: 8px; background: rgba(15, 18, 12, .95); }
.quest-profile-strip > div { display: grid; min-width: 0; min-height: 88px; align-content: center; gap: 5px; padding: 15px clamp(16px, 1.6vw, 25px); border-right: 1px solid rgba(231, 220, 197, .12); }
.quest-profile-strip > div:last-child { border-right: 0; }
.quest-profile-strip small { color: #a6a497; font-size: 10px; font-weight: 850; letter-spacing: .09em; }
.quest-profile-strip strong { display: flex; min-width: 0; align-items: center; gap: 9px; overflow: hidden; color: #f2ecdf; font: 700 clamp(21px, 1.55vw, 29px)/1.05 var(--quest-display); text-overflow: ellipsis; white-space: nowrap; }
.quest-profile-strip strong i { color: #c9a85e; font-size: .8em; }
.quest-profile-strip > div > span { color: #a8a496; font-size: 12px; font-weight: 700; }
.quest-survivor { display: flex !important; align-items: center !important; flex-direction: row; }
.quest-avatar-frame { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; overflow: hidden; border: 1px solid #8f9e29; border-radius: 50%; background: #24291a; color: var(--quest-olive); font-size: 23px; }
.quest-avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.quest-survivor > div { display: grid; min-width: 0; gap: 5px; }
.quest-survivor > div > span { color: #9dae49; font-size: 11px; font-weight: 800; }
.quest-survivor > div > span[data-online="false"] { color: #bb725d; }

.quest-board { overflow: hidden; border: 1px solid rgba(231, 220, 197, .14); border-radius: 10px; background: #10130d; }
.quest-board > header, .quest-history > header { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: clamp(18px, 1.8vw, 28px); border-bottom: 1px solid rgba(231, 220, 197, .12); background: linear-gradient(90deg, rgba(168, 186, 56, .08), transparent); }
.quest-board h2, .quest-history h2, .quest-set-bonus h2 { margin: 0; font: 700 clamp(29px, 2.2vw, 40px)/1 var(--quest-display); }
.quest-board > header p, .quest-history > header p { max-width: 560px; margin: 0; color: var(--quest-muted); font-size: 13px; line-height: 1.55; text-align: right; }
.quest-board-status { display: flex; align-items: center; justify-content: flex-end; gap: clamp(18px, 2vw, 32px); }
.quest-board-status > div { display: grid; min-width: 105px; justify-items: end; gap: 3px; padding-right: clamp(18px, 2vw, 30px); border-right: 1px solid rgba(231, 220, 197, .14); }
.quest-board-status strong { color: #dbe785; font: 700 25px/1 var(--quest-display); }
.quest-board-status span { margin: 0 !important; color: #a8a696 !important; font-size: 9px !important; white-space: nowrap; }
.quest-board-status p { max-width: 260px !important; }
.quest-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(231, 220, 197, .12); }
.quest-card { position: relative; display: grid; min-height: 340px; grid-template-rows: auto auto 1fr auto; gap: 14px; padding: clamp(21px, 1.8vw, 29px); overflow: hidden; background: linear-gradient(150deg, #171b12, #0c0f09); }
.quest-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--difficulty-color, var(--quest-olive)); content: ""; }
.quest-card[data-difficulty="easy"] { --difficulty-color: #83a94a; }
.quest-card[data-difficulty="medium"] { --difficulty-color: #d0a34d; }
.quest-card[data-difficulty="hard"] { --difficulty-color: #bb5e43; }
.quest-card.completed { background: linear-gradient(150deg, rgba(49, 67, 27, .97), #10150b); }
.quest-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quest-card-difficulty { display: inline-flex; min-height: 28px; align-items: center; padding: 0 11px; border: 1px solid var(--difficulty-color); border-radius: 999px; color: var(--difficulty-color); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.quest-card-reward { display: inline-flex; align-items: center; gap: 7px; color: #d9bd75; font: 700 22px/1 var(--quest-display); }
.quest-card-icon { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(168, 186, 56, .28); border-radius: 8px; background: rgba(168, 186, 56, .08); color: var(--quest-olive); font-size: 26px; }
.quest-card h3 { margin: 10px 0 0; font: 700 clamp(25px, 1.8vw, 33px)/1.06 var(--quest-display); }
.quest-card-description { margin: 0; color: #bdb8ac; font-size: clamp(14px, .95vw, 17px); line-height: 1.6; }
.quest-requirements { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.quest-requirements span { padding: 7px 9px; border: 1px solid rgba(231, 220, 197, .14); border-radius: 4px; color: #cdc6b8; font-size: 11px; font-weight: 750; }
.quest-progress { align-self: end; display: grid; gap: 9px; }
.quest-progress > div { display: flex; align-items: center; justify-content: space-between; color: #aaa799; font-size: 11px; font-weight: 800; }
.quest-progress strong { color: #f3eddf; font: 700 20px/1 var(--quest-display); }
.quest-progress progress, .quest-bonus-progress progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: #34362e; }
.quest-progress progress::-webkit-progress-bar, .quest-bonus-progress progress::-webkit-progress-bar { background: #34362e; }
.quest-progress progress::-webkit-progress-value, .quest-bonus-progress progress::-webkit-progress-value { background: var(--difficulty-color, var(--quest-olive)); }
.quest-progress progress::-moz-progress-bar, .quest-bonus-progress progress::-moz-progress-bar { background: var(--difficulty-color, var(--quest-olive)); }
.quest-turnin-button { display: inline-flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; border: 1px solid #8d9d27; border-radius: 5px; background: #667318; color: #fff; cursor: pointer; font-size: 12px; font-weight: 850; }
.quest-turnin-button:hover:not(:disabled) { background: #819020; }
.quest-turnin-button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .52; }
.quest-complete-stamp { display: inline-flex; align-items: center; gap: 8px; color: #bace56; font-size: 12px; font-weight: 850; letter-spacing: .06em; }

.quest-set-bonus { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, .3fr); align-items: center; gap: clamp(18px, 2.4vw, 38px); padding: clamp(25px, 2.7vw, 42px); border: 1px solid rgba(184, 202, 69, .32); border-radius: 9px; background: linear-gradient(100deg, rgba(82, 97, 27, .28), rgba(14, 18, 10, .97)); }
.quest-set-bonus > i { color: var(--quest-olive); font-size: clamp(47px, 4vw, 68px); }
.quest-set-bonus p { max-width: 760px; margin: 10px 0 0; color: #b9b5a7; font-size: 14px; line-height: 1.55; }
.quest-bonus-progress { display: grid; gap: 9px; }
.quest-bonus-progress strong { font: 700 27px/1 var(--quest-display); text-align: right; }
.quest-bonus-progress span { color: #a9a696; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-align: right; }
.quest-set-bonus.completed { border-color: #b8cc45; background: linear-gradient(100deg, rgba(109, 130, 31, .42), rgba(18, 25, 11, .98)); }

.quest-history { overflow: hidden; border: 1px solid rgba(231, 220, 197, .14); border-radius: 9px; background: #10130d; }
.quest-history-days { display: grid; }
.quest-history-day { display: grid; grid-template-columns: minmax(150px, .28fr) 1fr auto; align-items: center; gap: 20px; padding: 20px clamp(20px, 2.4vw, 34px); border-bottom: 1px solid rgba(231, 220, 197, .09); }
.quest-history-day:last-child { border-bottom: 0; }
.quest-history-day time { color: #eee7d9; font: 700 20px/1 var(--quest-display); }
.quest-history-day ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.quest-history-day li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(231, 220, 197, .12); border-radius: 999px; color: #aaa698; font-size: 11px; font-weight: 700; }
.quest-history-day li.complete { border-color: rgba(168, 186, 56, .4); color: #becd69; }
.quest-history-day > strong { color: #d2cdbc; font: 700 18px/1 var(--quest-display); }
.quest-history-empty { margin: 0; padding: 32px; color: #aaa698; text-align: center; }
.quest-footer { width: min(100%, 1880px); margin: 0 auto; }

@media (max-width: 1180px) {
  .quest-main { min-height: calc(100dvh - var(--app-header-height, 132px) - 55px); }
  .quest-header-actions .quest-account-button { width: var(--app-header-control-height); min-width: var(--app-header-control-height); padding: 0; }
  .quest-header-actions .quest-account-button span { display: none; }
  .quest-profile-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quest-profile-strip > div:nth-child(2) { border-right: 0; }
  .quest-profile-strip > div:nth-child(-n+2) { border-bottom: 1px solid rgba(231, 220, 197, .12); }
  .quest-card { min-height: 360px; }
}

@media (max-width: 860px) {
  .quest-main { padding: 14px; }
  .quest-hero { min-height: 285px; grid-template-columns: 1fr; align-content: center; padding: 24px; }
  .quest-reset { width: min(100%, 390px); }
  .quest-guest { grid-template-columns: 1fr; padding: 28px; }
  .quest-guest-art { min-height: 170px; }
  .quest-family-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quest-family-list li:nth-child(odd) { border-right: 1px solid rgba(231, 220, 197, .09); }
  .quest-card-grid { grid-template-columns: 1fr; }
  .quest-card { min-height: 0; }
  .quest-board-status { align-items: flex-end; flex-direction: column; gap: 8px; }
  .quest-board-status > div { padding-right: 0; border-right: 0; }
  .quest-set-bonus { grid-template-columns: auto 1fr; }
  .quest-bonus-progress { grid-column: 1 / -1; }
  .quest-bonus-progress strong, .quest-bonus-progress span { text-align: left; }
  .quest-history-day { grid-template-columns: 1fr auto; }
  .quest-history-day ul { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 560px) {
  .quest-main { padding: 0; }
  .quest-hero, .quest-board, .quest-set-bonus, .quest-history, .quest-profile-strip { border-right: 0; border-left: 0; border-radius: 0; }
  .quest-hero { min-height: 255px; gap: 17px; padding: 20px 18px; }
  .quest-hero h1 { font-size: clamp(36px, 11vw, 49px); }
  .quest-hero > div > span { margin-top: 9px; font-size: 14px; }
  .quest-reset { width: 100%; min-width: 0; padding: 13px 15px; }
  .quest-reset > i { font-size: 27px; }
  .quest-reset strong { font-size: 27px; }
  .quest-guest { padding: 25px 18px 34px; border-right: 0; border-left: 0; border-radius: 0; }
  .quest-guest-art { display: none; }
  .quest-family-list { grid-template-columns: 1fr; }
  .quest-family-list li:nth-child(odd) { border-right: 0; }
  .quest-profile-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quest-profile-strip > div { min-height: 82px; padding: 14px; border-bottom: 1px solid rgba(231, 220, 197, .12); }
  .quest-profile-strip > div:nth-child(2) { border-right: 1px solid rgba(231, 220, 197, .12); }
  .quest-profile-strip > div:nth-child(3) { border-right: 0; }
  .quest-profile-strip > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .quest-survivor { grid-column: 1 / -1; border-right: 0 !important; }
  .quest-board > header, .quest-history > header { display: grid; align-items: start; }
  .quest-board > header p, .quest-history > header p { text-align: left; }
  .quest-board-status { width: 100%; align-items: flex-start; flex-direction: row; justify-content: space-between; gap: 12px; }
  .quest-board-status > div { justify-items: start; }
  .quest-board-status p { text-align: right !important; }
  .quest-card { padding: 27px 20px; }
  .quest-set-bonus { grid-template-columns: 1fr; padding: 27px 20px; }
  .quest-set-bonus > i { font-size: 48px; }
  .quest-footer { margin-top: 20px; }
}
