:root {
  color-scheme: dark;
  --ink: #080c0c;
  --ink-soft: #0d1413;
  --panel: #121b19;
  --panel-raised: #192321;
  --line: #34433d;
  --line-bright: #53675e;
  --text: #f1eee3;
  --muted: #a8b2aa;
  --gold: #d8b66a;
  --gold-bright: #f4d68c;
  --green: #66c990;
  --green-deep: #26734d;
  --red: #e16f64;
  --red-deep: #792f2d;
  --blue: #71a9d8;
  --rare: #72b8f0;
  --heroic: #c994f3;
  --unique: #f1be62;
  --surface-stroke: rgba(160, 177, 164, .36);
  --surface-highlight: rgba(244, 218, 155, .16);
  --surface-shadow: 0 9px 25px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .055);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --header-height: 62px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, #26332c 0, transparent 40%),
    #050807;
  color: var(--text);
}

body {
  min-width: 320px;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

.sr-only {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

button {
  min-height: 48px;
  margin: 0;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  filter: saturate(.35);
  opacity: .45;
}

.app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  box-shadow: 0 0 60px rgba(0, 0, 0, .75);
}

.app[data-control-mode="dynamic"] { padding-bottom: var(--safe-bottom); }

.topbar {
  position: relative;
  z-index: 50;
  min-height: var(--header-height);
  flex: 0 0 var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left));
  border-bottom: 1px solid #435047;
  background:
    linear-gradient(90deg, rgba(216, 182, 106, .08), transparent 35%, rgba(216, 182, 106, .04)),
    linear-gradient(180deg, #141d1b, #0b1110);
  box-shadow: 0 5px 20px rgba(0, 0, 0, .35);
}

.topbar::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(216, 182, 106, .7), transparent);
}

.identity {
  min-width: 0;
}

.brand {
  overflow: hidden;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}

.sub {
  margin-top: 4px;
  overflow: hidden;
  color: #929e96;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resources {
  flex: none;
  display: flex;
  gap: 5px;
}

.resource-pill {
  min-width: 54px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px 12px 7px 12px;
  background: linear-gradient(145deg, rgba(35, 48, 44, .94), rgba(13, 20, 18, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 4px 12px rgba(0, 0, 0, .22);
}

.resource-pill strong {
  max-width: 68px;
  overflow: hidden;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.resource-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gold-pill {
  border-color: #665937;
}

.coin-mark {
  width: 13px;
  height: 13px;
  border: 2px solid var(--gold-bright);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #7a622d;
}

.world-wrap {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  isolation: isolate;
  background: #0c1510;
}

.world-wrap::before,
.world-wrap::after {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  content: "";
}

.world-wrap::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 6, 5, .38), transparent 17%, transparent 65%, rgba(3, 5, 5, .28)),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .32) 100%);
}

.world-wrap::after {
  inset: 0;
  border: 1px solid rgba(216, 182, 106, .12);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, .42);
}

canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #17251b;
  touch-action: none;
}

.hud {
  position: absolute;
  z-index: 8;
  top: 9px;
  right: calc(9px + var(--safe-right));
  left: calc(9px + var(--safe-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(138px, .92fr);
  gap: 7px;
  pointer-events: none;
}

.hud-card {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(117, 137, 126, .48);
  border-radius: 9px 15px 9px 15px;
  background: linear-gradient(135deg, rgba(31, 43, 39, .93), rgba(8, 14, 13, .9));
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 7px 20px rgba(0, 0, 0, .28);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.hud-kicker {
  color: #91a198;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
}

.zone-heading {
  min-width: 0;
  margin-top: 6px;
  display: grid;
  justify-items: start;
  gap: 4px;
}

.zone-name {
  width: 100%;
  min-width: 0;
  display: block;
  overflow: hidden;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-level {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.zone-threat,
#zoneThreat {
  flex: none;
  display: inline-block;
  padding: 3px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.zone-threat.threat-safe,
.zone-threat.safe,
.threat.safe,
#zoneThreat.safe,
.zone-threat[data-threat="safe"] {
  color: #80d9a5;
  background: rgba(44, 117, 76, .2);
}

.zone-threat.threat-warn,
.zone-threat.warn,
.zone-threat.caution,
.threat.warn,
.threat.caution,
#zoneThreat.warn,
#zoneThreat.caution,
.zone-threat[data-threat="warn"] {
  color: var(--gold-bright);
  background: rgba(142, 102, 37, .22);
}

.zone-threat.threat-danger,
.zone-threat.danger,
.threat.danger,
#zoneThreat.danger,
.zone-threat[data-threat="danger"] {
  color: #ff9389;
  background: rgba(129, 43, 39, .26);
}

.vitals-card {
  padding-bottom: 7px;
}

.vital-row,
.attack-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.vital-row strong,
.attack-readout strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vital-label,
.attack-readout span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.xp-row {
  margin-top: 6px;
}

.attack-readout {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(130, 149, 137, .2);
}

.attack-readout strong {
  color: var(--gold-bright);
}

.meter {
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid rgba(113, 132, 122, .52);
  border-radius: 999px;
  background: rgba(2, 5, 5, .78);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
}

.meter-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .15s ease-out;
}

.hp-fill {
  width: 100%;
  background: linear-gradient(90deg, #307f55, #76d79c);
  box-shadow: 0 0 7px rgba(102, 201, 144, .4);
}

.xp-fill {
  background: linear-gradient(90deg, #80652e, #e4c36f);
  box-shadow: 0 0 6px rgba(216, 182, 106, .36);
}

.enemy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.level-up-card {
  position: absolute;
  z-index: 42;
  top: 8px;
  left: 50%;
  width: min(300px, calc(100% - 14px));
  padding: 10px 12px;
  border: 1px solid rgba(238, 201, 112, .76);
  border-radius: 9px 17px 9px 17px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(.97);
  background:
    radial-gradient(circle at 50% 0, rgba(232, 194, 94, .2), transparent 58%),
    linear-gradient(145deg, rgba(49, 49, 35, .98), rgba(10, 17, 15, .98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .48), 0 0 24px rgba(222, 183, 84, .12), inset 0 1px rgba(255, 255, 255, .07);
  transition: opacity .18s ease, transform .18s ease;
}

.level-up-card.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.level-up-head,
.level-up-stats,
.level-up-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.level-up-head {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(226, 193, 108, .28);
}

.level-up-head span {
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .15em;
}

.level-up-head strong {
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
}

.level-up-stats {
  margin-top: 7px;
}

.level-up-stats div {
  min-width: 0;
  flex: 1;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(3, 8, 7, .4);
}

.level-up-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.level-up-stats strong {
  color: #fff0b4;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.named-found {
  position: absolute;
  z-index: 34;
  top: 47%;
  left: 50%;
  width: min(286px, calc(100% - 42px));
  padding: 12px 18px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(244, 194, 87, .82);
  border-radius: 8px 18px 8px 18px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -42%) scale(.96);
  background: radial-gradient(circle at 50% 0, rgba(224, 170, 59, .24), transparent 62%), rgba(9, 14, 13, .94);
  box-shadow: 0 0 0 1px rgba(255, 230, 159, .1), 0 14px 38px rgba(0, 0, 0, .48);
  transition: opacity .14s ease, transform .18s ease;
}

.named-found.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.named-found > span {
  color: #d9a740;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .22em;
}

.named-found strong {
  color: #ffe5a1;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 18px;
}

.named-found small {
  color: #c6d0c8;
  font-size: 11px;
  font-weight: 750;
}

.zone-flash {
  position: absolute;
  z-index: 18;
  top: 42%;
  left: 50%;
  width: min(330px, calc(100% - 40px));
  padding: 12px 16px;
  border-top: 1px solid rgba(216, 182, 106, .55);
  border-bottom: 1px solid rgba(216, 182, 106, .55);
  opacity: 0;
  pointer-events: none;
  color: #fff3ce;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  text-shadow: 0 2px 9px #000;
  transform: translate(-50%, -4px);
  background: linear-gradient(90deg, transparent, rgba(8, 12, 11, .88) 20%, rgba(8, 12, 11, .88) 80%, transparent);
  transition: opacity .25s ease, transform .25s ease;
}

.zone-flash.show,
.zone-flash.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.control-dock {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(174px + var(--safe-bottom));
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 8, .32) 24%, rgba(5, 9, 8, .78) 100%);
}

.control-dock::before {
  position: absolute;
  right: calc(8px + var(--safe-right));
  bottom: calc(8px + var(--safe-bottom));
  left: calc(8px + var(--safe-left));
  height: 156px;
  border: 1px solid rgba(137, 155, 144, .17);
  border-radius: 78px 14px 14px 78px;
  pointer-events: none;
  content: "";
  background: linear-gradient(100deg, rgba(20, 32, 28, .42), rgba(11, 17, 15, .72));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 8px 25px rgba(0, 0, 0, .16);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.control-dock[data-control-hand="right"]::before {
  border-radius: 14px 78px 78px 14px;
  background: linear-gradient(260deg, rgba(20, 32, 28, .42), rgba(11, 17, 15, .72));
}

.joystick-zone {
  position: absolute;
  z-index: 2;
  left: calc(6px + var(--safe-left));
  bottom: calc(5px + var(--safe-bottom));
  width: 160px;
  height: 160px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.control-dock[data-control-hand="right"] .joystick-zone {
  right: calc(6px + var(--safe-right));
  left: auto;
}

.joy-base {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 136px;
  height: 136px;
  overflow: hidden;
  border: 2px solid rgba(190, 207, 196, .28);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(112, 139, 123, .11) 0 9%, transparent 10%),
    repeating-conic-gradient(from 0deg, rgba(216, 182, 106, .1) 0 1deg, transparent 1deg 45deg),
    rgba(10, 17, 15, .57);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, .46), 0 5px 18px rgba(0, 0, 0, .25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.joy-base::before,
.joy-base::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(191, 205, 195, .1);
  transform: translate(-50%, -50%);
}

.joy-base::before {
  width: 72%;
  height: 1px;
}

.joy-base::after {
  width: 1px;
  height: 72%;
}

.joy-mark {
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(216, 182, 106, .16);
  border-radius: 50%;
}

.joy-knob {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 2px solid rgba(241, 238, 227, .62);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .22), transparent 25%),
    linear-gradient(145deg, rgba(106, 127, 115, .9), rgba(31, 47, 41, .92));
  box-shadow: inset 0 0 0 4px rgba(9, 15, 13, .2), 0 5px 15px rgba(0, 0, 0, .42);
  will-change: transform;
}

.tracked-named {
  position: absolute;
  z-index: 3;
  right: calc(12px + var(--safe-right));
  bottom: calc(116px + var(--safe-bottom));
  width: 149px;
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid rgba(218, 174, 86, .6);
  border-radius: 8px 13px 8px 13px;
  pointer-events: auto;
  text-align: left;
  background: linear-gradient(145deg, rgba(64, 48, 24, .95), rgba(15, 20, 17, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 5px 14px rgba(0, 0, 0, .34);
}

.control-dock[data-control-hand="right"] .tracked-named {
  right: auto;
  left: calc(12px + var(--safe-left));
}

.tracked-named[hidden] {
  display: none;
}

.tracked-named strong,
.tracked-named span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunt-hud-top,
.hunt-hud-meta {
  min-width: 0;
  display: flex;
  align-items: center;
}

.hunt-hud-top {
  gap: 5px;
}

.hunt-hud-top strong {
  flex: 1;
  min-width: 0;
}

.hunt-hud-mark {
  flex: none;
  color: #efbf58 !important;
  font-size: 15px !important;
  line-height: 1;
}

.hunt-hud-meta {
  justify-content: space-between;
  gap: 5px;
}

#huntDirection {
  flex: none;
  color: #f2ca6e;
  font-size: 9px;
}

.hunt-hud-track {
  width: 100%;
  height: 3px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .13);
}

.hunt-hud-track > span {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #b9782d, #f2d26e);
  box-shadow: 0 0 7px rgba(239, 194, 91, .44);
  transition: width .2s ease;
}

.tracked-named[data-state="active"] {
  border-color: rgba(246, 198, 91, .86);
  background: radial-gradient(circle at 18% 0, rgba(218, 156, 46, .25), transparent 58%), linear-gradient(145deg, rgba(64, 48, 24, .97), rgba(15, 20, 17, .97));
}

.tracked-named[data-state="active"] .hunt-hud-track {
  background: rgba(246, 197, 87, .18);
}

.hunt-guide {
  position: absolute;
  z-index: 75;
  inset: 0;
  padding: 12px calc(12px + var(--safe-right)) calc(184px + var(--safe-bottom)) calc(12px + var(--safe-left));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(2, 5, 4, 0);
  transition: opacity .18s ease, background-color .18s ease;
}

.hunt-guide-card {
  width: min(100%, 350px);
  padding: 14px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(224, 185, 91, .74);
  border-radius: 9px 18px 9px 18px;
  transform: translateY(8px);
  background: linear-gradient(120deg, rgba(63, 49, 24, .96), rgba(10, 16, 14, .98) 60%);
  box-shadow: 0 13px 34px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .06);
  transition: transform .18s ease;
}

.hunt-guide.show {
  opacity: 1;
  pointer-events: auto;
  background: rgba(2, 5, 4, .6);
}

.hunt-guide.show .hunt-guide-card { transform: translateY(0); }

.hunt-guide-kicker,
.hunt-guide-card > strong,
.hunt-guide-card > p { width: 100%; }

.hunt-guide-kicker {
  color: #d9a740;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .18em;
}

.hunt-guide-card > strong {
  color: #ffe4a0;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
}

.hunt-guide-card > p {
  margin: 0 0 2px;
  color: #cbd3cc;
  font-size: 11px;
  line-height: 1.45;
}

.hunt-guide-open {
  min-height: 40px;
  padding: 8px 13px;
  border-color: #ae8741;
  border-radius: 7px 12px;
  color: #fff0c1;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(145deg, #6c5125, #3c2c19);
}

.hunt-guide-skip {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #526158;
  border-radius: 7px 12px;
  color: #d6ded8;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(145deg, #293630, #131c19);
}

.hunt-guide-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 7px;
}

.tracked-named strong {
  color: #ffe09a;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 12px;
}

.tracked-named span {
  color: #bdc8bf;
  font-size: 11px;
  font-weight: 750;
}

.action-dock {
  position: absolute;
  z-index: 3;
  right: calc(12px + var(--safe-right));
  bottom: calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 5px;
  pointer-events: auto;
}

.control-dock[data-control-hand="right"] .action-dock {
  right: auto;
  left: calc(12px + var(--safe-left));
}

.action-btn {
  position: relative;
  width: 72px;
  min-height: 48px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid #4d5d55;
  border-radius: 7px 13px 7px 13px;
  background: linear-gradient(145deg, rgba(40, 54, 49, .94), rgba(12, 20, 18, .94));
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 5px 12px rgba(0, 0, 0, .3);
  transition: border-color .12s ease, filter .12s ease, transform .08s ease;
}

.action-btn::after {
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 13px;
  height: 1px;
  content: "";
  background: var(--gold);
  opacity: .45;
  transform: rotate(-45deg);
  transform-origin: right;
}

.action-btn:active {
  filter: brightness(1.18);
  transform: translateY(1px) scale(.98);
}

.action-glyph {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 9px rgba(216, 182, 106, .26);
}

.target-glyph {
  font-size: 25px;
}

.action-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.toast {
  position: absolute;
  z-index: 35;
  bottom: calc(184px + var(--safe-bottom));
  left: 50%;
  max-width: calc(100% - 28px);
  padding: 9px 14px;
  overflow: hidden;
  border: 1px solid #6d654a;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  color: #fff3ce;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, 7px);
  background: rgba(13, 19, 17, .95);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .38);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show,
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.drop-tray {
  position: absolute;
  z-index: 70;
  inset: 0;
  padding: 12px calc(10px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(10px + var(--safe-left));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(2, 5, 4, .72);
  transition: opacity .2s ease;
}

.drop-tray.show,
.drop-tray.is-visible,
.drop-tray[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  background: rgba(2, 5, 4, .72);
}

.drop-content {
  width: min(90%, 410px);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: auto;
}

.drop-card {
  position: relative;
  width: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line-bright);
  border-radius: 11px 18px 11px 18px;
  background: linear-gradient(125deg, rgba(47, 64, 57, .95), rgba(11, 17, 15, .97) 58%), var(--panel);
  box-shadow: 0 13px 32px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.drop-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: #aab6ae;
  box-shadow: 0 0 12px currentColor;
}

.drop-card.normal::before,
.drop-card.rarity-normal::before,
.drop-card.common::before {
  background: #c8d0ca;
}

.drop-card.rare,
.drop-card.rarity-rare {
  border-color: rgba(114, 184, 240, .68);
  background: radial-gradient(circle at 12% 0, rgba(86, 164, 224, .2), transparent 42%), linear-gradient(125deg, rgba(31, 53, 66, .97), rgba(9, 16, 17, .97) 62%);
}

.drop-card.rare::before,
.drop-card.rarity-rare::before {
  background: var(--rare);
}

.drop-card.heroic,
.drop-card.rarity-heroic {
  border-color: rgba(201, 148, 243, .72);
  background: radial-gradient(circle at 12% 0, rgba(157, 80, 207, .25), transparent 44%), linear-gradient(125deg, rgba(48, 30, 60, .97), rgba(12, 13, 18, .98) 64%);
}

.drop-card.heroic::before,
.drop-card.rarity-heroic::before {
  background: var(--heroic);
}

.drop-card.unique,
.drop-card.rarity-unique {
  border-color: rgba(241, 190, 98, .8);
  background: radial-gradient(circle at 12% 0, rgba(223, 158, 55, .3), transparent 45%), linear-gradient(125deg, rgba(61, 45, 22, .98), rgba(13, 15, 14, .98) 66%);
  box-shadow: 0 13px 35px rgba(0, 0, 0, .58), 0 0 19px rgba(241, 190, 98, .14), inset 0 1px rgba(255, 255, 255, .08);
}

.drop-tray.jackpot .drop-card {
  animation: jackpot-arrive 1.35s ease-out both;
}

@keyframes jackpot-arrive {
  0% { filter: brightness(1.65); box-shadow: 0 13px 35px rgba(0, 0, 0, .58), 0 0 34px rgba(255, 207, 93, .62); }
  45% { filter: brightness(1.08); box-shadow: 0 13px 35px rgba(0, 0, 0, .58), 0 0 25px rgba(255, 207, 93, .3); }
  100% { filter: none; }
}

.drop-card.unique::before,
.drop-card.rarity-unique::before {
  background: var(--unique);
}

.drop-item-lead {
  min-width: 0;
  flex: none;
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 18px 12px;
}

.drop-card > .drop-identity { padding: 18px 18px 12px; }

.drop-identity {
  min-width: 0;
}

.weapon-art {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 211, 203, .3);
  border-radius: 8px 14px 8px 14px;
  color: #d9e1dc;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .11), transparent 62%), rgba(3, 8, 8, .42);
}

.weapon-art.drop {
  width: 98px;
  height: 108px;
}

.weapon-art.compact {
  width: 39px;
  height: 43px;
  flex: none;
}

.equip-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.equip-main > div:last-child {
  min-width: 0;
}

.weapon-art.rare { border-color: rgba(102, 196, 255, .58); color: #8fd8ff; }
.weapon-art.heroic { border-color: rgba(214, 139, 255, .64); color: #e2a7ff; }
.weapon-art.unique { border-color: rgba(255, 210, 104, .78); color: #ffe09a; box-shadow: inset 0 0 14px rgba(226, 166, 48, .18); }

.weapon-svg {
  width: 78px;
  height: 78px;
  overflow: visible;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .55));
}

.weapon-svg.compact {
  width: 31px;
  height: 31px;
}

.weapon-svg .blade { fill: currentColor; stroke: #f5fff8; stroke-width: 1.2; stroke-linejoin: round; }
.weapon-svg .wide { stroke-width: 1.6; }
.weapon-svg .grip { fill: #6f4b31; stroke: #d8b572; stroke-width: 1.2; }
.weapon-svg .guard { fill: none; stroke: #d3a957; stroke-width: 3.4; stroke-linecap: round; }
.weapon-svg .shaft { fill: none; stroke: #7b5234; stroke-width: 5; stroke-linecap: round; }
.weapon-svg .axe-head { stroke: #f1f8f4; stroke-width: 1.2; }
.weapon-svg .magic-blade { fill: currentColor; stroke: #f0dbff; }
.weapon-svg .gem { fill: #f2c767; stroke: #fff0ae; stroke-width: 1; }
.weapon-svg .unique-mark { fill: rgba(255, 211, 92, .2); stroke: #ffd36c; stroke-width: 1.4; }

.weapon-art > span {
  position: absolute;
  right: 3px;
  bottom: 2px;
  left: 3px;
  color: #c8d2cb;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: .08em;
}

.upgrade-badge {
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border: 1px solid rgba(101, 209, 135, .68);
  border-radius: 999px;
  color: #a5efb9;
  font-size: 10px;
  font-weight: 950;
  background: rgba(25, 99, 55, .32);
}

.drop-body {
  min-height: 0;
  flex: 1 1 auto;
  padding: 0 18px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.drop-base {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(104, 122, 112, .26);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(4, 9, 8, .36);
  font-size: 12px;
}

.drop-base strong { color: #edf0e8; text-align: right; }

.comparison-summary { margin-top: 11px; }

.comparison-heading {
  color: #d8cfb8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

.upgrade-badge.sustain {
  border-color: rgba(88, 190, 167, .6);
  color: #9de7d2;
  background: rgba(25, 91, 78, .3);
}

.drop-tray.rarity-rare .weapon-art {
  animation: weapon-find-rare .46s ease-out both;
}

.drop-tray.rarity-heroic .weapon-art {
  animation: weapon-find-heroic .68s ease-out both;
}

.drop-tray.major .drop-card {
  animation: major-upgrade-arrive .72s ease-out both;
}

.drop-tray.jackpot.major .drop-card {
  animation: jackpot-arrive 1.35s ease-out both, major-upgrade-arrive .72s ease-out both;
}

@keyframes weapon-find-rare {
  0% { filter: brightness(1.55); box-shadow: 0 0 18px rgba(92, 190, 255, .45); }
  100% { filter: none; }
}

@keyframes weapon-find-heroic {
  0% { filter: brightness(1.8); box-shadow: 0 0 28px rgba(208, 123, 255, .58); transform: scale(.94); }
  55% { transform: scale(1.04); }
  100% { filter: none; transform: none; }
}

@keyframes major-upgrade-arrive {
  0% { box-shadow: 0 13px 32px rgba(0, 0, 0, .52), 0 0 30px rgba(96, 224, 140, .56); }
  100% { box-shadow: 0 13px 32px rgba(0, 0, 0, .52), 0 0 10px rgba(96, 224, 140, .08); }
}

.drop-head,
.item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.drop-kicker,
.rarity-label,
.source-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
}

.drop-kicker {
  color: #9eaaa2;
  font-size: 9px;
  letter-spacing: .18em;
}

.rarity-label {
  width: fit-content;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.1;
  background: rgba(4, 8, 7, .5);
}

.drop-name,
.item-name,
.name {
  margin-top: 2px;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.drop-name {
  margin: 5px 0 0;
  color: #fff8e5;
  font-size: 20px;
  line-height: 1.22;
}

.drop-meta {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drop-meta span {
  padding: 3px 7px;
  border: 1px solid rgba(128, 146, 135, .38);
  border-radius: 5px 8px 5px 8px;
  color: #dce4de;
  background: rgba(5, 10, 9, .4);
  font-size: 11px;
  font-weight: 850;
}

.drop-meta .quality-chip { border-color: #c8a957; color: #ffe6a1; }
.same-unique { margin-top: 10px; padding: 8px; border: 1px solid rgba(221, 179, 89, .34); border-radius: 9px; background: rgba(29, 25, 16, .5); }
.same-unique-row { display: grid; grid-template-columns: minmax(64px, 1fr) auto auto auto; align-items: center; gap: 5px; padding: 5px 2px; border-bottom: 1px solid rgba(180, 151, 90, .2); font-size: 11px; }
.same-unique-row:last-child { border-bottom: 0; }
.same-unique-row.current { color: #ffe4a0; }
.same-unique-row b { color: #f2d082; }
.same-unique-row strong { font-variant-numeric: tabular-nums; }
.item-lock { display: block; margin-top: 9px; padding: 7px 10px; border: 1px solid rgba(195, 173, 111, .5); border-radius: 8px; color: #eee1ba; background: rgba(32, 37, 31, .85); font-size: 12px; font-weight: 800; }
.inv-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.inv-actions button:disabled, .drop-actions button:disabled { opacity: .45; cursor: not-allowed; }
.depth-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; padding: 10px; border: 1px solid rgba(186, 158, 91, .4); border-radius: 9px; background: rgba(27, 42, 36, .7); }
.depth-choice strong { color: #ffe4a0; }
.depth-choice span { flex: 1 1 150px; color: var(--muted); font-size: 12px; }
.memo-known { margin-top: 6px; color: #e7d399; font-size: 11px; line-height: 1.4; }
@media (max-width: 360px) { .same-unique-row { grid-template-columns: 1fr auto; } .same-unique-row span:nth-child(3) { text-align: right; } }

.drop-identity .drop-source { margin-top: 7px; }

.drop-source,
.item-meta,
.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.drop-compare {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.unique-summary {
  margin-top: 9px;
  padding: 8px;
  border: 1px solid rgba(236, 190, 86, .35);
  border-radius: 8px 12px 8px 12px;
  background: rgba(47, 36, 15, .34);
}

.unique-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unique-summary-head span {
  color: #d4c59c;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}

.unique-summary-head b {
  padding: 3px 7px;
  border: 1px solid #b88c3e;
  border-radius: 999px;
  color: #fff0ad;
  font-size: 11px;
  background: rgba(145, 96, 22, .35);
}

.unique-summary-head .summary-badge.candidate {
  border-color: #557b64;
  color: #a8e6bb;
  background: rgba(31, 91, 52, .28);
}

.drop-compare.focused {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unique-role {
  margin-top: 7px;
  color: #ffe5a0;
  font-size: 12px;
  font-weight: 850;
}

.compare-row,
.compare-stat {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(101, 120, 109, .28);
  border-radius: 7px;
  background: rgba(4, 9, 8, .42);
  font-size: 12px;
}

.compare-row > span { color: #bdc6bf; }
.compare-row.positive > b { color: #7de0a7; }
.compare-row.negative > b { color: #ff9087; }
.compare-row.neutral > b { color: #d1d8d2; }

.change,
.compare-value {
  flex: none;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.positive,
.up,
.good {
  color: #7de0a7;
}

.negative,
.down,
.bad,
.danger {
  color: #ff9087;
}

.neutral {
  color: #d1d8d2;
}

.drop-actions {
  flex: none;
  margin: 0;
  padding: 11px 18px 14px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 6px;
  border-top: 1px solid rgba(109, 126, 116, .25);
  background: linear-gradient(180deg, rgba(13, 20, 18, .97), rgba(7, 12, 11, .995));
}

.drop-actions.two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drop-actions button,
.primary-btn,
.secondary-btn,
.danger-btn,
.small,
.close {
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid #506159;
  border-radius: 7px 11px 7px 11px;
  background: linear-gradient(145deg, #293630, #131c19);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  transition: filter .12s ease, transform .08s ease;
}

.drop-actions button:active,
.primary-btn:active,
.secondary-btn:active,
.danger-btn:active,
.small:active,
.close:active {
  filter: brightness(1.16);
  transform: translateY(1px);
}

.drop-actions button:first-child,
.primary-btn,
.small.gold {
  border-color: #8c7137;
  background: linear-gradient(145deg, #6a5429, #2a2418);
  color: #fff0c5;
}

.danger-btn,
.drop-actions .drop-sell {
  border-color: #6d423d;
  color: #e8b1a9;
}

.drop-tray.compact {
  right: calc(68px + var(--safe-right));
  left: auto;
  width: min(250px, calc(100% - 82px));
}

.drop-tray.compact .drop-compare,
.drop-tray.compact .drop-actions,
.drop-tray.compact .drop-source,
.drop-tray.compact .item-meta {
  display: none;
}

.drop-tray.compact .drop-card {
  padding: 8px 10px;
}

.sheet {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: none;
  align-items: flex-end;
  padding-top: 40px;
  background: rgba(2, 5, 4, .76);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sheet.show,
.sheet.is-visible {
  display: flex;
}

.panel {
  position: relative;
  width: 100%;
  max-height: min(82%, 720px);
  padding: 15px calc(12px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(12px + var(--safe-left));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #667269;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(31, 43, 39, .98), rgba(10, 16, 14, .99) 120px), var(--panel);
  box-shadow: 0 -15px 42px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .04);
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.panel::before {
  position: sticky;
  z-index: 2;
  top: -9px;
  left: 50%;
  width: 42px;
  height: 4px;
  display: block;
  margin: -6px auto 9px;
  border-radius: 999px;
  content: "";
  background: #65736a;
}

.panel,
.panel * {
  touch-action: pan-y;
}

.control-setting {
  margin-bottom: 10px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #35463e;
  border-radius: 9px 14px 9px 14px;
  background: rgba(8, 14, 12, .72);
}

.control-setting-copy strong,
.control-setting-copy span { display: block; }
.control-setting-copy strong { color: #eee2c0; font-size: 13px; }
.control-setting-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.control-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid #43544c;
  border-radius: 8px;
  background: #080e0c;
}

.control-choice button {
  min-width: 64px;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #aeb9b1;
  font-size: 11px;
  font-weight: 900;
  background: transparent;
}

.control-choice button.selected,
.control-choice button[aria-checked="true"] {
  border-color: #8c7137;
  color: #fff0c5;
  background: linear-gradient(145deg, #604c28, #282117);
}

.panel button,
.panel input,
.panel select {
  touch-action: manipulation;
}

.panel-head {
  position: sticky;
  z-index: 3;
  top: -15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -2px 11px;
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(112, 131, 120, .27);
  background: linear-gradient(180deg, #1e2a26 70%, rgba(30, 42, 38, 0));
}

.panel-head h2,
.panel-title {
  margin: 0;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 18px;
  letter-spacing: .06em;
}

.panel-head .close {
  min-width: 58px;
  min-height: 48px;
  flex: none;
}

.section {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #33413b;
  border-radius: 9px 14px 9px 14px;
  background: rgba(8, 14, 12, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.section:last-child {
  margin-bottom: 0;
}

.section h3,
.section-title {
  margin: 0 0 8px;
  color: #e9ddbb;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 14px;
  letter-spacing: .04em;
}

.stats,
.stat-grid {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.stat {
  min-width: 0;
  padding: 7px 4px;
  border: 1px solid #33423b;
  border-radius: 7px 11px 7px 11px;
  background: rgba(8, 14, 12, .7);
  text-align: center;
}

.stat b,
.stat strong {
  display: block;
  overflow: hidden;
  color: #f4e5b8;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.equip-row,
.inv-row,
.item-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(104, 122, 112, .24);
}

.equip-row:first-child,
.inv-row:first-child,
.item-card:first-child {
  padding-top: 2px;
}

.equip-row:last-child,
.inv-row:last-child,
.item-card:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.tags,
.item-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag,
.op-tag {
  padding: 3px 6px;
  border: 1px solid #43544c;
  border-radius: 5px 8px 5px 8px;
  color: #d7ded8;
  background: rgba(35, 49, 44, .52);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.signature-tag,
.tag.signature {
  border-color: #766439;
  color: #f1d794;
  background: rgba(103, 79, 30, .2);
}

.normal,
.common,
.rarity-normal {
  color: #dce2dd;
}

.rare,
.rarity-rare {
  color: var(--rare);
}

.heroic,
.rarity-heroic,
.epic {
  color: var(--heroic);
}

.unique,
.rarity-unique,
.legend {
  color: var(--unique);
  text-shadow: 0 0 9px rgba(241, 190, 98, .18);
}

.drop-card.normal,
.drop-card.common,
.drop-card.rare,
.drop-card.heroic,
.drop-card.unique,
.drop-card.rarity-normal,
.drop-card.rarity-rare,
.drop-card.rarity-heroic,
.drop-card.rarity-unique {
  color: var(--text);
}

.memo-grid {
  display: grid;
  gap: 8px;
}

.memo-card {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #34443d;
  border-radius: 9px 14px 9px 14px;
  background: linear-gradient(120deg, rgba(36, 50, 44, .7), rgba(9, 15, 13, .84));
}

.memo-card.active,
.memo-card.tracked,
.memo-card.selected {
  border-color: #8a733e;
  box-shadow: inset 3px 0 #c8a957;
}

.memo-card.named-ready,
.memo-card.ready {
  border-color: #9873aa;
  box-shadow: 0 0 16px rgba(187, 123, 221, .12), inset 3px 0 #c994f3;
}

.memo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.memo-name {
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
  font-weight: 850;
}

.memo-zone,
.memo-count,
.memo-signature {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.memo-signature strong {
  color: #edd28a;
}

.memo-named {
  margin: 7px 0 2px;
  padding: 6px 8px;
  border: 1px solid rgba(201, 148, 243, .32);
  border-radius: 6px 9px 6px 9px;
  color: #e5c5f3;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  background: rgba(91, 48, 109, .18);
}

.tracked-list {
  display: grid;
  gap: 6px;
}

.tracked-row {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(112, 131, 120, .28);
  border-radius: 7px 11px 7px 11px;
  background: rgba(7, 13, 11, .55);
}

.tracked-row.active {
  border-color: rgba(218, 174, 86, .52);
  background: rgba(65, 47, 19, .28);
}

.tracked-row .tracked-mark {
  color: var(--gold-bright);
  text-align: center;
}

.tracked-row div,
.tracked-row strong,
.tracked-row span {
  min-width: 0;
}

.tracked-row strong,
.tracked-row div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracked-row strong {
  color: #f3e4b7;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
}

.tracked-row div > span,
.tracked-row b {
  color: var(--muted);
  font-size: 11px;
}

.tracked-row.active b {
  color: #ffd987;
}

.history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-title h3 {
  margin-bottom: 8px;
}

.history-title > span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 7px 3px;
  border-bottom: 1px solid rgba(104, 122, 112, .2);
  color: #e2e7e3;
  font-size: 13px;
  line-height: 1.45;
}

.history-list li:last-child {
  border-bottom: 0;
}

.history-list .history-mark {
  color: var(--gold-bright);
  text-align: center;
}

.trace-row,
.memo-trace {
  margin-top: 7px;
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #c8d0ca;
  font-size: 12px;
}

.trace-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid #4a564f;
  border-radius: 999px;
  background: #060a09;
}

.trace-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6e5380, #ce96e8);
  box-shadow: 0 0 8px rgba(201, 148, 243, .36);
}

.help,
.empty-state {
  color: #bbc6be;
  font-size: 12px;
  line-height: 1.75;
}

.help strong,
.empty-state strong {
  color: #f1d58b;
}

@media (max-width: 370px) {
  :root {
    --header-height: 58px;
  }

  .topbar {
    padding-right: calc(8px + var(--safe-right));
    padding-left: calc(8px + var(--safe-left));
  }

  .brand {
    font-size: 16px;
    letter-spacing: .04em;
  }

  .sub {
    max-width: 128px;
    letter-spacing: .02em;
  }

  .resource-pill {
    min-width: 49px;
    padding: 5px 6px;
  }

  .resource-pill strong {
    max-width: 48px;
  }

  .hud {
    top: 7px;
    right: calc(6px + var(--safe-right));
    left: calc(6px + var(--safe-left));
    grid-template-columns: minmax(0, 1fr) 136px;
    gap: 5px;
  }

  .hud-card {
    padding: 7px;
  }

  .zone-heading {
    display: block;
  }

  .zone-threat,
  #zoneThreat {
    max-width: 100%;
    margin-top: 5px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .action-dock {
    right: calc(8px + var(--safe-right));
    grid-template-columns: repeat(2, 69px);
  }

  .action-btn {
    width: 69px;
  }

  .tracked-named {
    right: calc(8px + var(--safe-right));
    width: 143px;
  }

  .control-dock[data-control-hand="right"] .tracked-named {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .joystick-zone {
    left: calc(2px + var(--safe-left));
  }

  .control-dock[data-control-hand="right"] .joystick-zone {
    right: calc(2px + var(--safe-right));
    left: auto;
  }

  .control-dock[data-control-hand="right"] .action-dock {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .drop-tray {
    inset: 0;
    padding-right: calc(7px + var(--safe-right));
    padding-left: calc(7px + var(--safe-left));
  }

  .drop-card {
    padding: 0;
  }

  .compare-row,
  .compare-stat {
    padding: 5px;
  }

  .panel {
    padding-right: calc(9px + var(--safe-right));
    padding-left: calc(9px + var(--safe-left));
  }
}

@media (max-height: 720px) {
  .hud-card {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .drop-tray {
    inset: 0;
    padding-top: 7px;
    padding-bottom: calc(7px + var(--safe-bottom));
  }

  .drop-card {
    max-height: 100%;
    overflow: hidden;
  }

  .drop-item-lead {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 13px 9px;
  }

  .weapon-art.drop {
    width: 84px;
    height: 92px;
  }

  .weapon-svg.drop {
    width: 68px;
    height: 68px;
  }

  .drop-actions {
    position: static;
    z-index: 2;
    margin: 0;
    padding: 8px 13px 9px;
    background: linear-gradient(180deg, rgba(10, 15, 14, .94), rgba(10, 15, 14, .99) 32%);
    box-shadow: 0 -1px rgba(10, 15, 14, .95);
  }

  .drop-actions button {
    min-height: 44px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .drop-body { padding: 0 13px 9px; }
  .drop-name { font-size: 18px; }

  .panel {
    max-height: 88%;
  }
}

@media (max-height: 520px) {
  :root {
    --header-height: 50px;
  }

  .topbar {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .brand { font-size: 15px; }
  .sub { margin-top: 2px; font-size: 9px; }

  .resource-pill {
    min-width: 48px;
    min-height: 36px;
    padding: 4px 6px;
  }

  .hud {
    top: 5px;
    gap: 5px;
  }

  .hud-card {
    padding: 4px 7px;
  }

  .hud-kicker { font-size: 9px; }

  .zone-heading {
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .zone-name { font-size: 12px; }
  .zone-level { margin-top: 2px; font-size: 10px; }
  .zone-threat,
  #zoneThreat { padding: 2px 4px; font-size: 10px; }

  .vitals-card { padding-bottom: 4px; }
  .vital-row,
  .attack-readout { font-size: 10px; }
  .vital-row strong,
  .attack-readout strong { font-size: 11px; }
  .vital-label,
  .attack-readout span { font-size: 10px; }
  .xp-row { margin-top: 3px; }
  .attack-readout { margin-top: 3px; padding-top: 2px; }
  .meter { height: 5px; margin-top: 2px; }

  .toast {
    bottom: calc(128px + var(--safe-bottom));
  }

  .control-dock {
    height: calc(112px + var(--safe-bottom));
  }

  .control-dock::before {
    right: calc(5px + var(--safe-right));
    bottom: calc(5px + var(--safe-bottom));
    left: calc(5px + var(--safe-left));
    height: 102px;
    border-radius: 54px 12px 12px 54px;
  }

  .control-dock[data-control-hand="right"]::before {
    border-radius: 12px 54px 54px 12px;
  }

  .joystick-zone {
    bottom: calc(2px + var(--safe-bottom));
    width: 108px;
    height: 108px;
  }

  .joy-base {
    top: 8px;
    left: 8px;
    width: 92px;
    height: 92px;
  }

  .joy-mark { inset: 12px; }

  .joy-knob {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
  }

  .tracked-named {
    right: calc(8px + var(--safe-right));
    bottom: calc(61px + var(--safe-bottom));
    width: 204px;
    min-height: 48px;
    padding: 4px 7px;
  }

  .control-dock[data-control-hand="right"] .tracked-named {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .action-dock {
    right: calc(8px + var(--safe-right));
    bottom: calc(6px + var(--safe-bottom));
    grid-template-columns: repeat(4, 48px);
    gap: 4px;
  }

  .control-dock[data-control-hand="right"] .action-dock {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .action-btn {
    width: 48px;
    min-height: 48px;
    grid-template-columns: 1fr;
    padding: 4px;
  }

  .action-label { display: none; }

  .drop-item-lead {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 12px 5px;
  }

  .drop-card > .drop-identity {
    padding: 7px 12px 5px;
  }

  .weapon-art.drop {
    width: 62px;
    height: 66px;
  }

  .weapon-svg.drop {
    width: 51px;
    height: 51px;
  }

  .drop-kicker {
    display: none;
  }

  .rarity-label {
    margin-top: 0;
    padding: 2px 7px;
  }

  .drop-name {
    margin-top: 2px;
    font-size: 16px;
    line-height: 1.12;
  }

  .drop-meta,
  .drop-identity .drop-source {
    margin-top: 3px;
  }

  .drop-body {
    padding: 0 12px 5px;
  }

  .drop-actions {
    padding: 5px 12px 6px;
  }

  .drop-actions button {
    min-height: 40px;
  }

  .hunt-guide {
    padding: calc(8px + env(safe-area-inset-top, 0px)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));
    align-items: center;
  }

  .hunt-guide-card {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-height: 520px) and (max-width: 370px) {
  .control-dock {
    height: calc(160px + var(--safe-bottom));
  }

  .control-dock::before {
    height: 150px;
  }

  .joystick-zone {
    bottom: calc(24px + var(--safe-bottom));
  }

  .toast {
    bottom: calc(176px + var(--safe-bottom));
  }

  .tracked-named {
    right: calc(8px + var(--safe-right));
    bottom: calc(112px + var(--safe-bottom));
    width: 133px;
    min-height: 44px;
  }

  .control-dock[data-control-hand="right"] .tracked-named {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .action-dock {
    right: calc(8px + var(--safe-right));
    grid-template-columns: repeat(2, 64px);
  }

  .control-dock[data-control-hand="right"] .action-dock {
    right: auto;
    left: calc(8px + var(--safe-left));
  }

  .action-btn {
    width: 64px;
    grid-template-columns: 23px 1fr;
    padding: 4px 5px;
  }

  .action-label {
    display: block;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* v0.5-E: dynamic controls float above one continuous field, without a reserved pad bay. */
.control-dock[data-control-hand="dynamic"] {
  height: 0;
  background: none;
}
.control-dock[data-control-hand="dynamic"]::before,
.control-dock[data-control-hand="dynamic"] .joystick-zone {
  display: none;
}

.control-dock[data-control-hand="dynamic"] .action-dock {
  right: calc(8px + var(--safe-right));
  bottom: calc(7px + var(--safe-bottom));
  left: auto;
  grid-template-columns: repeat(4, 48px);
  gap: 4px;
}
.control-dock[data-control-hand="dynamic"] .action-btn {
  width: 48px;
  min-height: 48px;
  grid-template-columns: 1fr;
  padding: 4px;
}
.control-dock[data-control-hand="dynamic"] .action-label { display: none; }
.control-dock[data-control-hand="dynamic"] .tracked-named {
  right: calc(8px + var(--safe-right));
  bottom: calc(63px + var(--safe-bottom));
  left: auto;
  width: min(204px, calc(100% - 16px - var(--safe-left) - var(--safe-right)));
  min-height: 48px;
  padding: 4px 7px;
}

.dynamic-joystick {
  position: absolute;
  z-index: 19;
  width: 108px;
  height: 108px;
  display: none;
  border: 2px solid rgba(210, 229, 212, .34);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(143, 186, 155, .13), rgba(16, 31, 24, .26) 72%, rgba(8, 17, 14, .12));
  box-shadow: 0 0 18px rgba(9, 16, 13, .22), inset 0 0 16px rgba(255, 255, 255, .04);
  transform: translate(-50%, -50%);
}

.dynamic-joystick.active { display: grid; place-items: center; }
.dynamic-joystick-knob {
  width: 35%;
  height: 35%;
  border: 1px solid rgba(236, 241, 224, .65);
  border-radius: 50%;
  background: rgba(139, 167, 146, .58);
  box-shadow: 0 2px 9px rgba(0, 0, 0, .3);
}

.control-setting { grid-template-columns: minmax(0, 1fr); }
.control-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.control-choice button { min-width: 0; }
.drop-display-choice { grid-template-columns: minmax(0, 1fr); }
.drop-display-choice button { min-height: 42px; text-align: left; }

/* The compact card is non-modal: only its own controls receive taps. */
.drop-tray.compact-show {
  z-index: 55; /* below the settings/history sheet; the large modal remains above it */
  opacity: 1;
  background: transparent;
  pointer-events: none;
  transition: none;
}
.drop-tray.compact-show .drop-content {
  position: absolute;
  right: calc(10px + var(--safe-right));
  bottom: calc(182px + var(--safe-bottom));
  width: min(258px, calc(100% - 20px - var(--safe-left) - var(--safe-right)));
  height: auto;
  display: block;
  pointer-events: auto;
}
.drop-tray.compact-show .drop-card {
  max-height: none;
  display: block;
  border-radius: 9px 13px 9px 13px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .46);
}
.compact-lead {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px 4px;
}
.compact-identity { min-width: 0; display: grid; gap: 1px; }
.compact-identity .rarity-label { font-size: 9px; }
.compact-identity .drop-name {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-identity > span:last-child { color: var(--muted); font-size: 9px; }
.compact-lead .weapon-art.compact { width: 38px; height: 39px; }
.compact-lead .weapon-art.compact span { display: none; }
.compact-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 0 9px 5px; }
.compact-compare .compare-row { padding: 3px 4px; font-size: 10px; }
.drop-tray.compact-show .drop-actions { padding: 4px 8px 6px; gap: 4px; }
.drop-tray.compact-show .drop-actions button { min-height: 38px; padding: 4px; font-size: 11px; }
.drop-tray.compact-show .drop-detail {
  width: 100%;
  min-height: 40px;
  border-top: 1px solid rgba(180, 198, 186, .18);
  color: #d9e7dc;
  font-size: 11px;
  font-weight: 800;
  background: rgba(18, 31, 26, .85);
}
.drop-tray.compact-show .drop-detail:focus-visible { outline-offset: -3px; }
.drop-back {
  min-height: 36px;
  margin: 8px 12px 0;
  padding: 5px 9px;
  border: 1px solid rgba(188, 203, 190, .28);
  border-radius: 6px;
  color: #d9e7dc;
  font-size: 11px;
  text-align: left;
  background: rgba(24, 36, 30, .85);
}

@media (max-height: 520px) {
  .drop-tray.compact-show .drop-content { bottom: calc(114px + var(--safe-bottom)); }
  .drop-tray.compact-show .compact-lead { padding: 3px 7px 2px; }
  .drop-tray.compact-show .compact-lead .weapon-art.compact { width: 30px; height: 31px; }
  .drop-tray.compact-show .compact-lead .weapon-svg.compact { width: 25px; height: 25px; }
  .drop-tray.compact-show .compact-identity > span:last-child { display: none; }
  .drop-tray.compact-show .compact-compare { padding: 0 7px 2px; }
  .drop-tray.compact-show .compact-compare .compare-row:nth-child(2) { display: none; }
  .drop-tray.compact-show .drop-actions { padding: 2px 6px 3px; }
  .drop-tray.compact-show .drop-actions button { min-height: 32px; }
}

@media (max-height: 520px) and (max-width: 370px) {
  .drop-tray.compact-show .drop-content { bottom: calc(165px + var(--safe-bottom)); }
}

/* Dynamic mode has no reserved pad bay; compact rewards stay above its floating controls. */
.app[data-control-mode="dynamic"] .drop-tray.compact-show .drop-content { bottom: calc(124px + var(--safe-bottom)); }

/* Keep comparison readable on narrow phones: actions live beneath each item, not beside its text. */
@media (max-width: 430px) {
  .inv-row { grid-template-columns: minmax(0, 1fr); }
  .inv-actions { justify-content: flex-start; }
  .inv-actions .small { min-height: 42px; padding: 7px 9px; }
}

/* v0.7.1: one compact depth entry in the existing chrome, not on the playing field. */
.identity { flex: 1 1 auto; }
.resources { flex: none; }
.depth-button {
  position: relative;
  min-width: 73px;
  min-height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 7px;
  border: 1px solid rgba(181, 163, 113, .58);
  border-radius: 10px 13px 10px 13px;
  color: #f5e7bc;
  background: linear-gradient(150deg, rgba(66, 59, 40, .85), rgba(18, 26, 23, .95));
  box-shadow: var(--surface-shadow);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.depth-button-mark { color: var(--gold-bright); font-size: 12px; }
.depth-button-arrow { color: #c7b88e; font-size: 17px; line-height: 1; }
.depth-button[data-depth="2"] { border-color: rgba(169, 205, 185, .7); color: #d5f0dc; background: linear-gradient(150deg, rgba(35, 76, 63, .9), rgba(13, 29, 27, .96)); }
.depth-button[data-depth="2"] .depth-button-mark { color: #b1e3c0; }
.depth-button[data-unlocked="true"][data-depth="1"]::after {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  content: "";
  background: #f2d27d;
  box-shadow: 0 0 6px #f2d27d;
}
@media (max-width: 370px) {
  .topbar { gap: 5px; }
  .brand { font-size: 15px; letter-spacing: 0; }
  .sub { font-size: 9px; }
  .depth-button { min-width: 67px; padding: 4px 5px; font-size: 11px; }
}
@media (max-height: 520px) { .depth-button { min-height: 40px; } }

/* Shared restrained material and type scale for in-field chrome and menus. */
.resource-pill, .hud-card, .tracked-named, .action-btn, .depth-button {
  border-radius: 10px 13px 10px 13px;
  box-shadow: var(--surface-shadow);
}
.hud-card { border-color: var(--surface-stroke); background: linear-gradient(145deg, rgba(29, 42, 37, .94), rgba(8, 16, 14, .92)); }
.tracked-named { border-color: rgba(205, 170, 96, .55); }
.action-btn { border-color: var(--surface-stroke); background: linear-gradient(145deg, rgba(36, 52, 45, .96), rgba(10, 20, 17, .96)); }
.action-btn:focus-visible, .depth-button:focus-visible { outline-offset: 2px; }
.panel { border-color: rgba(181, 198, 181, .4); box-shadow: 0 -15px 42px rgba(0, 0, 0, .54), inset 0 1px var(--surface-highlight); }
.section, .memo-card, .control-setting, .depth-choice { border-color: var(--surface-stroke); }
.drop-card { border-color: var(--surface-stroke); box-shadow: 0 18px 40px rgba(0, 0, 0, .56), inset 0 1px var(--surface-highlight); }
.drop-item-lead, .drop-card > .drop-identity { background: linear-gradient(125deg, rgba(255, 255, 255, .045), transparent 60%); }
.drop-card.unique .drop-item-lead, .drop-card.unique > .drop-identity { background: linear-gradient(105deg, rgba(253, 203, 108, .1), transparent 66%); }
.drop-card.heroic .drop-item-lead { background: linear-gradient(105deg, rgba(204, 150, 244, .1), transparent 66%); }
.drop-actions button, .primary-btn, .secondary-btn, .danger-btn, .small, .close, .item-lock, .drop-detail { border-radius: 9px 12px 9px 12px; }
.rarity-label, .upgrade-badge, .quality-chip { font-variant-numeric: tabular-nums; }
.panel-kicker { color: #e5c47a; font-size: 10px; font-weight: 900; letter-spacing: .16em; }

.sheet.depth-sheet {
  align-items: center;
  justify-content: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(9px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(9px + var(--safe-left));
}
.sheet.depth-sheet .panel {
  width: min(100%, 380px);
  max-height: 100%;
  padding: 18px 16px 19px;
  border: 1px solid rgba(208, 183, 115, .66);
  border-radius: 16px;
  background: radial-gradient(circle at 15% 0, rgba(193, 158, 79, .14), transparent 55%), linear-gradient(145deg, #26352e, #0d1714 64%);
  box-shadow: 0 23px 56px rgba(0, 0, 0, .62), inset 0 1px rgba(250, 227, 166, .13);
}
.depth-sheet .panel::before { display: none; }
.depth-intro { margin: 7px 0 15px; color: #d8e0d5; font-size: 13px; line-height: 1.65; }
.depth-options { display: grid; gap: 8px; }
.depth-option {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(155, 178, 160, .34);
  border-radius: 11px;
  background: rgba(8, 19, 16, .72);
}
.depth-option.current { border-color: rgba(219, 181, 97, .73); background: linear-gradient(110deg, rgba(128, 96, 39, .3), rgba(9, 19, 16, .72)); }
.depth-option.locked { opacity: .72; }
.depth-option-number { color: #c9ad70; font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.depth-option-copy { min-width: 0; display: grid; gap: 3px; }
.depth-option-copy strong { color: #f9eac1; font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 15px; }
.depth-option-copy span { color: #c5d0c5; font-size: 11px; line-height: 1.35; }
.depth-option-status { max-width: 83px; color: #dfc992; font-size: 11px; font-weight: 850; line-height: 1.35; text-align: right; }
.depth-option .small { min-height: 42px; padding: 6px 9px; white-space: nowrap; }
.depth-unlock-head { display: grid; justify-items: center; gap: 6px; padding-top: 3px; text-align: center; }
.depth-unlock-head h2 { margin: 0; color: #fff0be; font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 23px; letter-spacing: .06em; }
.depth-unlock-emblem { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(245, 207, 112, .7); border-radius: 50%; color: #ffe4a2; font-family: Georgia, serif; font-size: 23px; background: radial-gradient(circle, rgba(202, 152, 58, .32), rgba(30, 35, 28, .6)); box-shadow: 0 0 18px rgba(231, 183, 78, .18); }
.unlock-sheet .depth-intro { margin: 14px 2px 17px; text-align: center; }
.depth-unlock-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.depth-unlock-actions button { min-height: 48px; }
@media (max-height: 520px) { .sheet.depth-sheet .panel { padding: 11px 13px; } .depth-option { padding: 8px; } .depth-intro { margin: 5px 0 9px; line-height: 1.45; } .depth-unlock-emblem { width: 38px; height: 38px; font-size: 19px; } }

/* Reward hierarchy: the same card material at both sizes, with a brief quality accent. */
.drop-meta .quality-chip.high, .quality-chip.high, .rarity-label.high {
  border: 1px solid rgba(242, 202, 112, .8);
  border-radius: 7px;
  color: #fff2bb;
  background: linear-gradient(120deg, rgba(148, 106, 33, .66), rgba(71, 58, 28, .56));
  box-shadow: inset 0 1px rgba(255, 249, 213, .18), 0 0 12px rgba(233, 181, 70, .13);
  font-size: 11px;
  font-weight: 900;
}
.inventory-quality.high, .same-unique-row.high b {
  color: #ffe3a0;
  font-weight: 900;
  text-shadow: 0 0 9px rgba(230, 176, 74, .24);
}
.drop-tray.high-quality .drop-card { animation: quality-arrive .8s ease-out both; }
.drop-tray.jackpot.high-quality .drop-card { animation: quality-arrive .8s ease-out both; }
@keyframes quality-arrive { 0% { box-shadow: 0 14px 35px rgba(0, 0, 0, .6), 0 0 32px rgba(255, 208, 105, .42); } 100% { box-shadow: 0 14px 35px rgba(0, 0, 0, .6), 0 0 13px rgba(255, 208, 105, .13); } }
.drop-tray.compact-show .drop-card { border-radius: 10px 13px 10px 13px; }
.drop-tray.compact-show .drop-detail { color: #f2d798; border-color: rgba(219, 183, 96, .26); }
.drop-tray.compact-show .drop-detail::before { content: "◇ "; color: #e6be66; }
.named-found { box-shadow: 0 0 0 1px rgba(255, 230, 159, .13), 0 17px 42px rgba(0, 0, 0, .53), 0 0 24px rgba(229, 167, 60, .14); }
.named-found::after { width: 48px; height: 1px; margin: 5px auto 0; content: ""; background: linear-gradient(90deg, transparent, #e8c47b, transparent); }
@media (prefers-reduced-motion: reduce) { .drop-tray.high-quality .drop-card { animation: none; } }
