.field-guide {
  position:absolute; top:max(calc(var(--edge) + 49px),calc(env(safe-area-inset-top) + 49px));
  right:max(var(--edge),env(safe-area-inset-right)); display:grid; justify-items:end; gap:7px;
  pointer-events:none;
}
.radar-line { display:flex; align-items:center; justify-content:flex-end; gap:6px }
.field-guide button { pointer-events:auto }
.field-guide #mapButton,.field-guide #xpHunt,.field-guide #objective { position:static }
.field-guide #xpHunt { min-height:44px }
.field-guide #objective {
  display:flex; align-items:center; gap:8px; width:max-content; max-width:min(230px,calc(50vw - max(var(--edge),env(safe-area-inset-right)))); min-height:49px;
  text-align:left; padding:6px 8px 7px 13px; border:0; border-right:2px solid #e8ba6e; border-radius:0;
  color:#fff0c9; background:linear-gradient(90deg,transparent,#182621ed 10%,#192822f2 82%,#2f3527f2);
  box-shadow:none; text-shadow:0 1px 2px #12201c;
}
.tracker-copy { display:grid; gap:2px; min-width:0 }
.tracker-copy b { font:700 16px/1.05 var(--title); color:#ffda8b }
.tracker-copy span { font:600 11px/1.2 var(--font); color:#f3edda }
#questCount { color:#ffe098; white-space:nowrap; font:750 11px var(--font); font-variant-numeric:tabular-nums }
#questCount:empty { display:none }
.field-guide #objective i { width:9px; height:12px; color:#d5b87c }
.quest-diamond {
  display:inline-grid; place-items:center; flex:none; width:12px; height:12px; transform:rotate(45deg);
  border:1.5px solid #ffda83; background:#33271a; box-shadow:0 0 0 1px #34291e;
}
.quest-diamond::before { content:''; width:4px; height:4px; background:#ffda83 }

#layer.quest-open {
  grid-template:minmax(0,1fr) / minmax(0,1fr); justify-items:end; align-items:center;
  padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  background:linear-gradient(90deg,#0b171c38,#0b171c82); backdrop-filter:blur(1.5px);
}
.quest-open .dialog {
  padding:3px; width:min(402px,100%); height:min(548px,100%); overflow:hidden; border:1px solid #d5b078; border-radius:6px;
  background:linear-gradient(115deg,#c59d62,#4b4032 19%,#705b43 73%,#c9a46c); box-shadow:0 7px 26px #0a161c7a,inset 0 0 0 1px #342b22;
}
.quest-open #content { display:grid; grid-template-rows:auto minmax(0,1fr) auto; height:100%; overflow:hidden; border:1px solid #332a21 }
.quest-open .dialog #close {
  top:9px; right:9px; z-index:1; width:44px; height:44px; border:0; border-radius:0; box-shadow:none;
  background:radial-gradient(circle,#182725d9 0 45%,transparent 48%); color:#ffebbe;
}
.quest-header {
  display:flex; align-items:flex-end; gap:15px; padding:20px 46px 16px 21px; min-height:104px;
  color:#ffedc2; background:linear-gradient(0deg,#172820f5,#192d2570 86%),url('assets/lookout.jpg') center 43% / cover;
  border-bottom:3px ridge #9c7d51; text-shadow:0 2px 3px #16251f;
}
.quest-header small,.quest-leaf h3 {
  text-transform:uppercase; font:800 10px/1.3 var(--font); letter-spacing:.14em;
}
.quest-header small { color:#ffdb95 }
.quest-header h2 { margin:2px 0 0; color:#fff1cb; font:700 clamp(25px,5vw,33px)/1.04 var(--title); letter-spacing:-.025em }
.quest-standard {
  display:grid; place-items:center; flex:none; width:39px; height:49px; padding-bottom:6px;
  color:#ffe1a0; background:linear-gradient(95deg,#4f3927,#9c7142 10%,#58442e 15%,#6b5034 85%,#a37b4c 90%,#463827);
  border-top:2px solid #d4ae73; clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);
}
.quest-standard i { width:23px; height:23px }
.quest-leaf {
  overflow-y:auto; overscroll-behavior:contain; padding:17px 21px 20px; color:#352d20; scrollbar-color:#a88b62 #dbcbab;
  background:linear-gradient(90deg,#ae976b40,transparent 4%,transparent 97%,#a28b663b),linear-gradient(125deg,#ede3c8,#e3d4b2 65%,#ddc9a4);
  box-shadow:inset 0 2px 6px #705b3923;
}
.quest-open .quest-brief { color:#4a4131; font:500 15px/1.4 var(--title); margin:0 0 17px }
.quest-leaf h3 { display:flex; align-items:center; gap:9px; margin:0 0 6px; color:#655238 }
.quest-leaf h3::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,#a99167a1,#a991671f) }
.quest-steps { list-style:none; margin:0; padding:0 }
.quest-steps li { position:relative; display:flex; align-items:center; gap:11px; min-height:44px; padding:6px 0 }
.quest-steps li+li::before { content:''; position:absolute; left:7px; top:-50%; bottom:50%; width:1px; background:#aa9571 }
.step-mark {
  z-index:1; display:grid; place-items:center; flex:none; width:15px; height:15px; border:1px solid #9c8866;
  border-radius:50%; background:#e6d8b8; color:#f6eed5; font:800 10px/1 var(--font);
}
.step-done .step-mark { background:#496653; border-color:#496653 }
.step-current .step-mark { width:12px; height:12px; margin:0 1.5px; background:#6b4826; border:1px solid #5b3e23; transform:rotate(45deg) }
.step-current .step-mark::after { content:''; width:5px; height:5px; background:#ffda83 }
.quest-steps b,.quest-steps small,.quest-entry b,.quest-entry small { display:block }
.quest-steps b { font:700 16px/1.15 var(--title) }
.quest-steps small,.quest-entry small { margin-top:2px; color:#62563f; font:600 11px/1.2 var(--font) }
.quest-steps .step-later { color:#675c49 }
.quest-steps strong { margin-left:auto; color:#72502b; white-space:nowrap; font:750 12px var(--font) }
.sr-quest { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap }
.quest-rewards { margin-top:17px }
.quest-rewards>div { display:flex; flex-wrap:wrap; gap:4px 18px }
.quest-rewards span { display:flex; align-items:center; gap:6px; min-height:29px; font:700 14px var(--title) }
.quest-rewards i { width:19px; height:19px; color:#82572d }
.quest-rewards .relic-art { width:30px; height:30px }
.quest-footer {
  display:flex; gap:9px; padding:9px 13px; border-top:2px ridge #a38254;
  background:linear-gradient(#364039,#202d2a);
}
.quest-footer button {
  display:flex; justify-content:center; align-items:center; gap:6px; flex:1; min-height:44px;
  padding:5px; border-radius:4px; font:700 14px var(--title);
}
.quest-footer i { width:15px; height:15px }
.quest-footer .secondary { border-color:#9c906b99; background:#24332e; color:#f2e1bc }
.quest-footer .primary { background:linear-gradient(#f7d58c,#d5a25e); border-color:#f6d69d }
.quest-index { padding-block:12px }
.quest-index h3:not(:first-child) { margin-top:16px }
.quest-entry {
  display:flex; align-items:center; gap:11px; width:100%; min-height:45px; text-align:left; padding:5px 8px;
  color:#392e20; border:0; border-bottom:1px solid #a48f695e; border-radius:0; background:transparent;
}
.quest-entry.tracked { background:linear-gradient(90deg,#ccb17aa6,#d4bd862b); box-shadow:inset 2px 0 #876232 }
.quest-entry .entry-seal { display:grid; place-items:center; width:29px; height:29px; color:#79603e }
.quest-entry b { font:700 17px/1.1 var(--title) }
.quest-entry>i,.quest-entry>.entry-check,.quest-entry>.quest-diamond { margin-left:auto; margin-right:4px }
.quest-entry>i { width:9px; height:11px; color:#79603e }
.entry-check { color:#496653 }
@media(max-width:550px){
  .field-guide { top:max(53px,calc(env(safe-area-inset-top) + 41px)); gap:5px }
  .field-guide #objective { gap:6px; padding-left:10px }
  .tracker-copy b { font-size:14px }
  .tracker-copy span { font-size:11px }
  #layer.quest-open { align-items:end; justify-items:center; padding-inline:max(4px,env(safe-area-inset-left)) max(4px,env(safe-area-inset-right)); padding-bottom:max(4px,env(safe-area-inset-bottom)) }
  .quest-open .dialog { width:100%; height:min(548px,83vh,100%) }
}
@media(max-height:500px){
  .field-guide { top:max(53px,calc(env(safe-area-inset-top) + 44px)); gap:4px }
  .field-guide #objective { min-height:44px }
  #layer.quest-open { padding-block:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-bottom)) }
  .quest-header { min-height:68px; padding:8px 46px 8px 16px }
  .quest-header h2 { font-size:25px }
  .quest-leaf { padding:10px 16px }
  .quest-footer { padding-block:5px }
}
