:root {
  --miles-scene-width: min(100%, 1520px);
  --miles-scene-height: min(100dvh - 108px, calc((100vw - var(--app-shell-rail-width, 0px) - 32px) * 0.5625));
  --miles-plate-width: 100%;
  --miles-plate-height: 100%;
  --miles-plate-x: 50%;
  --miles-plate-y: 50%;
  --miles-plate-scale: 1;
}

body[data-current-feature-id="miles-to-go-planner"] {
  background: var(--app-shell-navy, #061d35);
}

.miles-plane-filter {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.miles-page {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 0 clamp(12px, 2.4vw, 28px) clamp(18px, 2vw, 28px);
  color: var(--paper);
}

.miles-travel-bureau {
  display: grid;
  gap: clamp(10px, 1.4vw, 18px);
  min-height: 100dvh;
  align-content: start;
}

.miles-scene-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding-top: clamp(14px, 2vw, 24px);
}

.miles-scene-copy .eyebrow {
  margin: 0 0 4px;
  color: var(--red);
  text-shadow: 0 1px 0 rgba(255, 249, 239, 0.18);
}

.miles-scene-copy h1 {
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.2vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
  text-align: left;
}

.miles-room-hint {
  margin: 0;
  color: #e8d4b4;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

.miles-scene {
  position: relative;
  width: var(--miles-scene-width);
  height: var(--miles-scene-height);
  min-height: 420px;
  max-height: 860px;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid rgba(232, 212, 180, 0.58);
  border-radius: 8px;
  background: #0b2e4a;
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 249, 239, 0.2);
  isolation: isolate;
}

.miles-scene-plate {
  position: absolute;
  z-index: 1;
  top: var(--miles-plate-y);
  left: var(--miles-plate-x);
  display: block;
  width: var(--miles-plate-width);
  height: var(--miles-plate-height);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: translate(-50%, -50%) scale(var(--miles-plate-scale));
  transform-origin: center;
  user-select: none;
}

.miles-overlay-coordinate-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.miles-overlay-zone {
  position: absolute;
  display: block;
  pointer-events: none;
}

.miles-overlay-zone--planning-wall {
  top: 11%;
  left: 5%;
  width: 34%;
  height: 35%;
}

.miles-overlay-zone--desk {
  top: 67%;
  left: 24%;
  width: 45%;
  height: 24%;
}

.miles-overlay-zone--folders {
  top: 55%;
  left: 73%;
  width: 20%;
  height: 27%;
}

.miles-overlay-zone--window {
  top: 5%;
  left: 58%;
  width: 42%;
  height: 58%;
}

.miles-overlay-zone--left-storage {
  top: 39%;
  left: 0;
  width: 15%;
  height: 41%;
}

.miles-cabinet-hotspot {
  position: absolute;
  z-index: 5;
  top: 44%;
  left: 0.4%;
  width: 10.8%;
  height: 35%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #2a170c;
  cursor: pointer;
  pointer-events: auto;
  filter:
    drop-shadow(0 0 14px rgba(232, 184, 91, 0.3))
    drop-shadow(0 9px 13px rgba(31, 14, 4, 0.2));
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.miles-cabinet-hotspot::before {
  content: "";
  position: absolute;
  inset: 8% 5% 10% 3%;
  border-radius: 4px;
  background: radial-gradient(circle at 52% 44%, rgba(232, 184, 91, 0.34), transparent 64%);
  box-shadow: 0 0 26px rgba(232, 184, 91, 0.31);
  opacity: 0.72;
  transition:
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.miles-cabinet-hotspot .miles-cabinet-hotspot__label {
  bottom: 56%;
  left: 28%;
  right: auto;
}


.miles-cabinet-hotspot:hover::before,
.miles-cabinet-hotspot:focus-visible::before,
.miles-cabinet-hotspot.is-active::before {
  opacity: 0.88;
  box-shadow: 0 0 30px rgba(232, 184, 91, 0.36);
}

.miles-cabinet-hotspot:hover,
.miles-cabinet-hotspot:focus-visible,
.miles-cabinet-hotspot.is-active {
  filter:
    drop-shadow(0 0 16px rgba(232, 184, 91, 0.32))
    drop-shadow(0 10px 14px rgba(31, 14, 4, 0.22));
  transform: translateY(-1px);
}

.miles-cabinet-hotspot:hover .miles-cabinet-hotspot__label,
.miles-cabinet-hotspot:focus-visible .miles-cabinet-hotspot__label {
  opacity: 1;
  transform: translate(0, 0) rotate(-2deg);
}

.miles-cabinet-hotspot.is-active .miles-cabinet-hotspot__label,
.miles-cabinet-hotspot.is-active:hover .miles-cabinet-hotspot__label,
.miles-cabinet-hotspot.is-active:focus-visible .miles-cabinet-hotspot__label {
  opacity: 0;
  transform: translate(-8px, 6px) rotate(-2deg);
}

.miles-cabinet-hotspot:focus-visible,
.miles-filing-drawer button:focus-visible {
  outline: none;
}

.miles-filing-drawer {
  position: absolute;
  z-index: 6;
  top: 49%;
  left: 6.6%;
  width: min(30%, 430px);
  height: 27%;
  min-width: 260px;
  min-height: 150px;
  color: #2d1b0d;
  opacity: 0;
  transform: perspective(900px) rotateY(-20deg) translate(-20%, 16%) scale(0.74);
  transform-origin: left center;
  transition:
    opacity 220ms ease,
    transform 360ms cubic-bezier(0.2, 0.82, 0.24, 1);
  pointer-events: none;
}

.miles-filing-drawer.is-open {
  opacity: 1;
  transform: perspective(900px) rotateY(-5deg) translate(0, 0) scale(1);
  pointer-events: auto;
}

.miles-filing-drawer__box {
  position: absolute;
  inset: 12% 0 2% 14%;
  border: 1px solid rgba(79, 42, 18, 0.86);
  border-radius: 3px;
  background:
    linear-gradient(120deg, rgba(73, 39, 18, 0.94), rgba(127, 73, 31, 0.96) 42%, rgba(67, 34, 15, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 233, 184, 0.08) 0 1px, transparent 1px 9px);
  box-shadow:
    0 18px 24px rgba(19, 9, 3, 0.34),
    inset 8px 0 12px rgba(24, 10, 2, 0.36),
    inset 0 2px 0 rgba(255, 229, 177, 0.2);
  transform: skewY(-2deg);
}

.miles-filing-drawer__face {
  position: absolute;
  inset: 18% 76% 5% 0;
  border: 1px solid rgba(55, 30, 16, 0.9);
  border-radius: 3px;
  background:
    linear-gradient(180deg, #213128, #14231e 48%, #0d1714),
    radial-gradient(circle at 40% 22%, rgba(232, 212, 180, 0.18), transparent 35%);
  box-shadow:
    8px 10px 20px rgba(18, 8, 2, 0.32),
    inset 0 0 0 1px rgba(232, 212, 180, 0.13);
}

.miles-filing-drawer__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54%;
  height: 15%;
  border: 1px solid rgba(58, 35, 13, 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, #d7ad5d, #8b5d20 58%, #e0bd77);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 237, 179, 0.58);
  transform: translate(-50%, -50%);
}

.miles-filing-drawer__plate {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 70%;
  padding: 2px 3px;
  border: 1px solid rgba(73, 48, 20, 0.78);
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #231304;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.46rem, 0.58vw, 0.64rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.miles-filing-drawer__contents {
  position: absolute;
  inset: 0 8% 10% 17%;
  overflow: visible;
}

.miles-drawer-index {
  position: absolute;
  z-index: 2;
  top: 20%;
  right: -30%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 42px;
  min-height: 0;
}

.miles-drawer-index__tab {
  position: relative;
  min-width: 38px;
  min-height: 30px;
  padding: 6px 4px;
  border: 1px solid rgba(105, 69, 29, 0.72);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background:
    linear-gradient(180deg, #ead09b, #c99552 70%, #a66a2d),
    repeating-linear-gradient(90deg, rgba(73, 43, 16, 0.08) 0 1px, transparent 1px 6px);
  color: #3b230d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.46rem, 0.56vw, 0.66rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 5px 8px rgba(32, 14, 4, 0.16),
    inset 0 1px 0 rgba(255, 245, 202, 0.48);
}

.miles-drawer-index__tab[aria-selected="true"] {
  z-index: 3;
  min-height: 30px;
  background:
    linear-gradient(180deg, #f0d8a1, #d6a65c 68%, #ba7e39),
    repeating-linear-gradient(90deg, rgba(73, 43, 16, 0.08) 0 1px, transparent 1px 6px);
  color: #7c1930;
  transform: translateX(4px);
}

.miles-drawer-index__tab:disabled {
  cursor: default;
  opacity: 0.42;
}

.miles-folder-stack {
  position: absolute;
  z-index: 1;
  inset: 32% 13% 23% 4%;
}

.miles-state-folder {
  position: absolute;
  left: calc(var(--folder-index) * 16.6%);
  bottom: calc(var(--folder-index) * 5.6%);
  display: grid;
  align-content: center;
  justify-items: start;
  width: 31%;
  height: 58%;
  min-width: 0;
  min-height: 62px;
  padding: 19px 11px 9px 18px;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/travel-desk/state-dossier-background.png") 5% 10% / 330% auto no-repeat;
  box-shadow:
    0 12px 13px rgba(37, 17, 5, 0.22);
  color: #3b230d;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transform: rotate(calc(-2deg + var(--folder-index) * 1.5deg));
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.miles-state-folder::before {
  content: "";
  position: absolute;
  top: -14px;
  left: calc(7% + var(--folder-index) * 7%);
  width: 46%;
  height: 19px;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent url("assets/travel-desk/state-dossier-background.png") 2% 4% / 760% auto no-repeat;
  box-shadow: none;
}

.miles-state-folder::after {
  content: none;
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 34%;
  height: 1px;
  background: rgba(91, 52, 20, 0.24);
  box-shadow:
    0 -8px 0 rgba(91, 52, 20, 0.13),
    0 -16px 0 rgba(91, 52, 20, 0.08);
}

.miles-state-folder__code {
  position: relative;
  z-index: 1;
  display: block;
  margin: 4px 0 0 4px;
  color: #2d1a09;
  font-size: clamp(0.88rem, 1.08vw, 1.22rem);
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-shadow: 0 1px 0 rgba(255, 244, 204, 0.42);
}

.miles-state-folder__name {
  position: absolute;
  z-index: 3;
  left: 8px;
  bottom: calc(100% + 8px);
  max-width: 145px;
  padding: 3px 6px;
  border: 1px solid rgba(111, 72, 31, 0.58);
  border-radius: 2px;
  background: rgba(244, 224, 181, 0.96);
  box-shadow: 0 6px 10px rgba(30, 13, 4, 0.18);
  color: #3b230d;
  font-size: clamp(0.46rem, 0.56vw, 0.62rem);
  letter-spacing: 0.05em;
  line-height: 1.05;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(5px) rotate(-1deg);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.miles-state-folder:hover,
.miles-state-folder:focus-visible {
  box-shadow:
    0 17px 18px rgba(37, 17, 5, 0.3);
  transform: translateY(-8px) rotate(calc(-2deg + var(--folder-index) * 1.5deg));
}

.miles-state-folder:hover .miles-state-folder__name,
.miles-state-folder:focus-visible .miles-state-folder__name {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

.miles-state-folder.is-selected {
  box-shadow:
    0 16px 20px rgba(37, 17, 5, 0.28),
    inset 5px 0 0 rgba(191, 13, 62, 0.68);
}

.miles-state-folder.is-selected .miles-state-folder__code::after {
  content: "pulled";
  position: absolute;
  top: 118%;
  left: 0;
  padding: 1px 4px;
  border: 1px solid rgba(191, 13, 62, 0.46);
  transform: rotate(-4deg);
  color: #7c1930;
  font-size: 0.36em;
  letter-spacing: 0.08em;
}

.miles-drawer-paging {
  position: absolute;
  right: 4%;
  bottom: 3%;
  left: 6%;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.miles-drawer-paging button {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid rgba(89, 55, 22, 0.68);
  border-radius: 2px;
  background: linear-gradient(180deg, #d8b26b, #9a6428);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.42rem, 0.54vw, 0.62rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 4px 8px rgba(24, 10, 2, 0.18),
    inset 0 1px 0 rgba(255, 239, 185, 0.48);
}

.miles-drawer-paging button:disabled {
  cursor: default;
  opacity: 0.34;
}

.miles-filing-drawer__close {
  position: absolute;
  top: 6%;
  right: 4%;
  min-width: 44px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid rgba(89, 55, 22, 0.76);
  border-radius: 2px;
  background: linear-gradient(180deg, #d6ad62, #8b5b22);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.52rem, 0.72vw, 0.72rem);
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 5px 10px rgba(24, 10, 2, 0.22),
    inset 0 1px 0 rgba(255, 239, 185, 0.5);
}

.miles-folder-transfer {
  position: absolute;
  z-index: 7;
  top: 58%;
  left: 15%;
  width: 10%;
  min-width: 92px;
  height: 8%;
  min-height: 46px;
  padding: 15px 12px 8px;
  border: 1px solid rgba(121, 82, 35, 0.76);
  border-radius: 3px 3px 5px 5px;
  background:
    linear-gradient(180deg, #edcf91, #d6a65c 62%, #b9823e),
    repeating-linear-gradient(0deg, rgba(76, 42, 15, 0.08) 0 1px, transparent 1px 6px);
  box-shadow:
    0 14px 18px rgba(32, 14, 4, 0.26),
    inset 0 1px 0 rgba(255, 245, 202, 0.5);
  color: #3b230d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.52rem, 0.72vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translate(0, 0) rotate(-2deg) scale(0.82);
}

.miles-folder-transfer::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 12%;
  width: 42%;
  height: 17px;
  border: 1px solid rgba(121, 82, 35, 0.62);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #efd59a, #d4a25a);
}

.miles-folder-transfer.is-moving {
  animation: miles-folder-to-desk 640ms cubic-bezier(0.24, 0.72, 0.28, 1) forwards;
}

.miles-plan-transfer {
  position: absolute;
  z-index: 9;
  top: var(--transfer-top, 69%);
  left: var(--transfer-left, 52%);
  width: 8%;
  min-width: 74px;
  height: 7%;
  min-height: 42px;
  padding: 13px 10px 7px;
  border: 1px solid rgba(121, 82, 35, 0.76);
  border-radius: 3px 3px 5px 5px;
  background:
    linear-gradient(180deg, #f0d391, #d6a157 60%, #b77c37),
    repeating-linear-gradient(0deg, rgba(76, 42, 15, 0.08) 0 1px, transparent 1px 6px);
  box-shadow:
    0 14px 18px rgba(32, 14, 4, 0.26),
    inset 0 1px 0 rgba(255, 245, 202, 0.48);
  color: #3b230d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.48rem, 0.64vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translate(0, 0) rotate(-5deg) scale(0.86);
}

.miles-plan-transfer::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 10%;
  width: 42%;
  height: 14px;
  border: 1px solid rgba(121, 82, 35, 0.62);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #f4d99c, #d5a157);
}

.miles-plan-transfer.is-moving {
  animation: miles-file-transfer 760ms cubic-bezier(0.24, 0.72, 0.28, 1) forwards;
}

.miles-plans-basket-hotspot {
  position: absolute;
  z-index: 5;
  top: 58%;
  left: 73.4%;
  width: 23%;
  height: 24%;
  min-width: 92px;
  min-height: 72px;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  filter:
    drop-shadow(0 0 15px rgba(232, 184, 91, 0.3))
    drop-shadow(0 9px 13px rgba(31, 14, 4, 0.2));
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.miles-plans-basket-hotspot::before {
  content: "";
  position: absolute;
  inset: 7% 4% 2%;
  border-radius: 8px;
  background: radial-gradient(circle at 48% 48%, rgba(232, 184, 91, 0.32), transparent 66%);
  box-shadow: 0 0 26px rgba(232, 184, 91, 0.3);
  opacity: 0.72;
  transition:
    opacity 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.miles-plans-basket-hotspot:hover::before,
.miles-plans-basket-hotspot:focus-visible::before,
.miles-plans-basket-hotspot.is-open::before {
  opacity: 0.9;
  box-shadow: 0 0 30px rgba(232, 184, 91, 0.36);
  transform: translateY(-2px);
}

.miles-plans-basket-hotspot:hover,
.miles-plans-basket-hotspot:focus-visible,
.miles-plans-basket-hotspot.is-open {
  filter:
    drop-shadow(0 0 17px rgba(232, 184, 91, 0.34))
    drop-shadow(0 11px 15px rgba(31, 14, 4, 0.22));
  transform: translateY(-1px);
}

.miles-plans-basket-hotspot:focus-visible {
  outline: none;
}

.miles-plans-basket-hotspot__label {
  position: absolute;
  right: 4%;
  bottom: calc(100% + 6px);
  display: grid;
  gap: 1px;
  min-width: 128px;
  padding: 5px 7px;
  border: 1px solid rgba(103, 65, 26, 0.62);
  border-radius: 2px;
  background: rgba(238, 210, 151, 0.94);
  box-shadow: 0 6px 9px rgba(25, 12, 4, 0.18);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.5rem, 0.62vw, 0.68rem);
  line-height: 1.05;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(4px) rotate(-1deg);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.miles-plans-basket-hotspot__label strong {
  color: #0a3161;
  font-size: 1.06em;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.miles-plans-basket-hotspot__label span {
  color: #5a3514;
}

.road-ideas-hotspot:hover .miles-plans-basket-hotspot__label,
.road-ideas-hotspot:focus-visible .miles-plans-basket-hotspot__label,
.miles-plans-basket-hotspot:hover .miles-plans-basket-hotspot__label,
.miles-plans-basket-hotspot:focus-visible .miles-plans-basket-hotspot__label {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

.miles-my-plans-workspace {
  position: absolute;
  z-index: 9;
  top: 48%;
  left: 55%;
  width: 34%;
  min-width: 370px;
  max-width: 540px;
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(8%, 18%) rotate(2deg) scale(0.86);
  transform-origin: 70% 100%;
  transition:
    opacity 180ms ease,
    transform 280ms cubic-bezier(0.2, 0.82, 0.24, 1);
}

.miles-my-plans-workspace.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0) rotate(1deg) scale(1);
}

.miles-my-plans-workspace:focus-visible {
  outline: 2px solid rgba(232, 212, 180, 0.92);
  outline-offset: 4px;
}

.miles-my-plans-workspace__surface {
  position: relative;
  min-height: 230px;
  padding: 23px 20px 18px;
  border: 1px solid rgba(85, 52, 21, 0.62);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.94), rgba(232, 204, 151, 0.92)),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.36), transparent 32%),
    repeating-linear-gradient(0deg, rgba(102, 62, 24, 0.045) 0 1px, transparent 1px 9px);
  box-shadow:
    0 18px 16px rgba(30, 12, 3, 0.28),
    inset 0 0 0 2px rgba(10, 49, 97, 0.07),
    inset 0 0 0 6px rgba(255, 249, 231, 0.28);
}

.miles-my-plans-workspace__surface::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(10, 49, 97, 0.22);
  border-radius: 3px;
  pointer-events: none;
}

.miles-my-plans-workspace__eyebrow,
.miles-my-plans-workspace__intro {
  margin: 0;
  color: #7c1930;
  font-size: clamp(0.48rem, 0.58vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.miles-my-plans-workspace h2 {
  margin: 5px 0 4px;
  color: #0a3161;
  font-size: clamp(1.12rem, 1.58vw, 1.6rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.miles-my-plans-workspace__intro {
  color: #5a3514;
  font-size: clamp(0.46rem, 0.56vw, 0.62rem);
  letter-spacing: 0.08em;
}

.miles-my-plans-workspace.is-empty .miles-my-plans-workspace__intro {
  max-width: 26ch;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.18;
}

.miles-my-plans-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  max-height: 178px;
  overflow: auto;
  padding-right: 3px;
}

.miles-my-plans-workspace.is-empty .miles-my-plans-list {
  display: none;
}

.miles-my-plans-empty {
  margin: 10px 0 0;
  color: #5a3514;
  font-size: clamp(0.58rem, 0.7vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.miles-my-plans-state {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(89, 55, 22, 0.44);
  border-left: 4px solid rgba(10, 49, 97, 0.5);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 249, 229, 0.78), rgba(235, 209, 159, 0.64));
  color: #2a1707;
  font: inherit;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 249, 232, 0.5);
}

.miles-my-plans-state:hover,
.miles-my-plans-state:focus-visible {
  background: rgba(255, 249, 231, 0.92);
  transform: translateY(-1px);
}

.miles-my-plans-state:focus-visible {
  outline: 2px solid rgba(10, 49, 97, 0.62);
  outline-offset: 2px;
}

.miles-my-plans-state__code {
  color: #7c1930;
  font-size: clamp(0.52rem, 0.62vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.miles-my-plans-state__name {
  overflow: hidden;
  color: #0a3161;
  font-size: clamp(0.56rem, 0.72vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.miles-my-plans-state__context {
  grid-column: 2;
  color: #5a3514;
  font-size: clamp(0.4rem, 0.48vw, 0.54rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

.miles-my-plans-state__action {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: #5a3514;
  font-size: clamp(0.42rem, 0.5vw, 0.56rem);
  font-weight: 900;
  letter-spacing: 0.07em;
}

.miles-my-plans-workspace__close {
  margin-top: 11px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(89, 55, 22, 0.7);
  border-radius: 2px;
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.48rem, 0.58vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-return-ticket {
  position: absolute;
  z-index: 6;
  top: 84.6%;
  left: 44%;
  width: clamp(92px, 8.4vw, 132px);
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  filter:
    drop-shadow(0 0 14px rgba(232, 184, 91, 0.29))
    drop-shadow(0 9px 13px rgba(31, 14, 4, 0.22));
  transform: rotate(-4deg);
  transform-origin: 52% 54%;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.miles-return-ticket::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.miles-return-ticket img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  filter: drop-shadow(0 9px 8px rgba(31, 14, 4, 0.34));
  pointer-events: none;
  user-select: none;
}

.miles-return-ticket:hover,
.miles-return-ticket:focus-visible,
.miles-return-ticket.is-open {
  filter:
    brightness(1.04)
    drop-shadow(0 0 16px rgba(232, 184, 91, 0.34))
    drop-shadow(0 11px 16px rgba(31, 14, 4, 0.24));
  transform: translateY(-5px) rotate(-2.5deg);
}

.miles-return-ticket:focus-visible {
  outline: none;
}

.miles-return-ticket__hint {
  position: absolute;
  right: 7%;
  bottom: calc(100% + 7px);
  display: grid;
  gap: 1px;
  min-width: 118px;
  padding: 5px 7px;
  border: 1px solid rgba(103, 65, 26, 0.62);
  border-radius: 2px;
  background: rgba(238, 210, 151, 0.94);
  box-shadow: 0 6px 9px rgba(25, 12, 4, 0.18);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.5rem, 0.62vw, 0.68rem);
  line-height: 1.05;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(4px) rotate(1.5deg);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.miles-return-ticket__hint strong {
  color: #0a3161;
  font-size: 1.06em;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.miles-return-ticket__hint span {
  color: #5a3514;
}

.miles-return-ticket:hover .miles-return-ticket__hint,
.miles-return-ticket:focus-visible .miles-return-ticket__hint {
  opacity: 1;
  transform: translateY(0) rotate(1.5deg);
}

.miles-go-again-workspace {
  position: fixed;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(28rem, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 280ms cubic-bezier(0.2, 0.82, 0.24, 1);
}

.miles-go-again-workspace.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

@media (min-width: 761px) {
  body[data-app-shell] .miles-go-again-workspace {
    left: calc(50% + var(--app-shell-rail-width, 0px) / 2);
    width: min(28rem, calc(100% - var(--app-shell-rail-width, 0px) - 32px));
  }
}

.miles-go-again-workspace:focus-visible {
  outline: 2px solid rgba(232, 212, 180, 0.92);
  outline-offset: 4px;
}

.miles-go-again-workspace__surface {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid rgba(85, 52, 21, 0.62);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.92), rgba(232, 204, 151, 0.92)),
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.38), transparent 32%),
    repeating-linear-gradient(0deg, rgba(102, 62, 24, 0.045) 0 1px, transparent 1px 9px);
  box-shadow:
    0 18px 16px rgba(30, 12, 3, 0.28),
    inset 0 0 0 2px rgba(124, 25, 48, 0.08),
    inset 0 0 0 6px rgba(255, 249, 231, 0.28);
}

.miles-go-again-workspace__surface::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(10, 49, 97, 0.22);
  border-radius: 3px;
  pointer-events: none;
}

.miles-go-again-workspace__surface::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 82px;
  aspect-ratio: 1387 / 570;
  background: transparent url("assets/travel-desk/return-ticket.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 4px rgba(34, 15, 5, 0.26));
  pointer-events: none;
  transform: rotate(3deg);
}

.miles-go-again-workspace__eyebrow,
.miles-go-again-workspace__intro {
  margin: 0;
  color: #7c1930;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.miles-go-again-workspace h2 {
  margin: 5px 0 4px;
  color: #0a3161;
  font-size: 1.8rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.miles-go-again-workspace__intro {
  color: #5a3514;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.miles-go-again-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.miles-go-again-select {
  width: min(100%, 20rem);
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(89, 55, 22, 0.44);
  border-left: 4px solid rgba(191, 13, 62, 0.52);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 249, 229, 0.76), rgba(235, 209, 159, 0.62));
  color: #2a1707;
  font: 1rem Georgia, "Times New Roman", serif;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 249, 232, 0.5);
}

.miles-go-again-select:hover,
.miles-go-again-select:focus-visible {
  background: rgba(255, 249, 231, 0.9);
}

.miles-go-again-select:focus-visible {
  outline: 2px solid rgba(10, 49, 97, 0.62);
  outline-offset: 2px;
}

.miles-go-again-empty {
  margin: 0;
  color: #5a3514;
  font-size: 1rem;
  line-height: 1.4;
}

.miles-go-again-workspace__close {
  margin-top: 11px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(89, 55, 22, 0.7);
  border-radius: 2px;
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-state-sheet {
  position: absolute;
  z-index: 8;
  top: 25.5%;
  left: 30%;
  display: block;
  width: 44%;
  min-width: 430px;
  max-width: 680px;
  aspect-ratio: 1448 / 1086;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/travel-desk/state-dossier-background.png") center / contain no-repeat;
  box-shadow: none;
  color: #35200d;
  font-family: Georgia, "Times New Roman", serif;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-4%, 10%) rotate(-1.5deg) scale(0.92);
  transform-origin: 22% 10%;
  transition:
    opacity 220ms ease,
    transform 320ms cubic-bezier(0.2, 0.82, 0.24, 1);
}

.miles-state-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0) rotate(-1.5deg) scale(1);
}

.miles-state-sheet:focus-visible {
  outline: 2px solid rgba(232, 212, 180, 0.94);
  outline-offset: 3px;
}

.miles-state-sheet__clip {
  display: none;
}

.state-field-notes-pin {
  position: relative;
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 24px;
  padding: 2px 6px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #0a3161;
  font: bold .8rem/1 Georgia, serif;
  cursor: pointer;
}
.state-field-notes-pin[hidden] { display: none; }
.miles-state-sheet.has-briefing-open .state-field-notes-pin { visibility: hidden; }
.state-field-notes-pin:hover { background: rgba(255, 248, 222, .6); }
.state-field-notes-pin:focus-visible { outline: 2px solid #bf0d3e; outline-offset: -2px; }
.state-field-notes-pin .field-note-pin-icon {
  margin-top: -4px;
  box-shadow: 1px 1px 2px rgba(10, 49, 97, .2);
}
.state-field-notes-pin__helper {
  position: absolute;
  right: calc(100% + 4px);
  width: max-content;
  padding: 4px 6px;
  border-radius: 2px;
  background: #fff8de;
  color: #0a3161;
  box-shadow: 0 1px 4px rgba(10, 49, 97, .15);
  font: normal .65rem/1.2 Georgia, serif;
  visibility: hidden;
  pointer-events: none;
}
.state-field-notes-pin:hover .state-field-notes-pin__helper,
.state-field-notes-pin:focus-visible .state-field-notes-pin__helper { visibility: visible; }

.miles-state-sheet__stamp {
  position: absolute;
  top: var(--dossier-status-top, 13.9%);
  left: var(--dossier-status-left, 8.7%);
  width: var(--dossier-status-width, 19.8%);
  min-height: var(--dossier-status-height, auto);
  padding: 4px 7px;
  border: 2px solid rgba(191, 13, 62, 0.52);
  color: rgba(191, 13, 62, 0.74);
  font-size: clamp(0.54rem, 0.62vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.miles-state-sheet.has-briefing-open .miles-state-sheet__stamp,
.miles-state-sheet.has-briefing-open .miles-state-sheet__header,
.miles-state-sheet.has-briefing-open .miles-state-sheet__tips,
.miles-state-sheet.has-briefing-open .miles-state-sheet__note span,
.miles-state-sheet.has-briefing-open .miles-state-sheet__note textarea,
.miles-state-sheet.has-briefing-open .miles-state-sheet__context,
.miles-state-sheet.has-briefing-open .miles-state-sheet__actions {
  opacity: 0;
  pointer-events: none;
}

.miles-state-sheet__header {
  position: absolute;
  top: var(--dossier-title-top, 17.9%);
  left: var(--dossier-title-left, 20.5%);
  width: var(--dossier-title-width, 54.1%);
  min-height: var(--dossier-title-height, auto);
  margin: 0;
  padding: 0;
}

.miles-state-sheet__header p {
  display: none;
}

.miles-state-sheet__header h2 {
  margin: 0;
  color: #0a3161;
  font-size: clamp(1.24rem, 1.82vw, 2.02rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.miles-state-sheet__tips {
  position: absolute;
  top: var(--dossier-previews-top, 30.1%);
  left: var(--dossier-previews-left, 12.9%);
  width: var(--dossier-previews-width, 77.7%);
  height: var(--dossier-previews-height, 23.6%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.miles-state-sheet__tips article {
  display: block;
  min-height: 0;
  overflow: hidden;
}

/* Reserve the pin's own grid row above the full-width personal story area. */
.miles-state-sheet__tips.has-saved-field-notes {
  height: calc(var(--dossier-notes-label-top, 58.5%) - var(--dossier-previews-top, 30.1%) - 4px);
  grid-template-rows: repeat(2, minmax(0, 1fr)) 24px;
}

.miles-tip-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 4px 6px;
  border: 0;
  border-left: 3px solid rgba(191, 13, 62, 0.55);
  border-radius: 2px;
  background: rgba(255, 248, 222, 0.34);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(104, 65, 26, 0.08);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.miles-tip-preview:hover,
.miles-tip-preview:focus-visible {
  background: rgba(255, 249, 226, 0.56);
  box-shadow:
    0 4px 8px rgba(44, 20, 6, 0.14),
    inset 0 0 0 1px rgba(191, 13, 62, 0.22);
  transform: translateY(-1px);
}

.miles-tip-preview:focus-visible {
  outline: 2px solid rgba(10, 49, 97, 0.62);
  outline-offset: 2px;
}

.miles-tip-preview__label {
  display: block;
  margin: 0 0 3px;
  color: #2a1707;
  font-size: clamp(0.58rem, 0.68vw, 0.78rem);
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-transform: uppercase;
}

.miles-state-sheet__tips p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: clamp(0.58rem, 0.68vw, 0.78rem);
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.miles-state-sheet__tips.has-saved-field-notes p {
  -webkit-line-clamp: 1;
}

@media (max-width: 374px) {
  /* Tiny files keep clear briefing titles; the full copy opens on tap. */
  .miles-state-sheet__tips.has-saved-field-notes p {
    display: none;
  }
}

.miles-tip-preview__cue {
  display: inline-block;
  margin-top: 2px;
  color: rgba(125, 13, 45, 0.82);
  font-size: clamp(0.48rem, 0.54vw, 0.62rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-state-sheet__note {
  display: contents;
  margin: 0;
  padding: 0;
}

.miles-state-sheet__note span {
  position: absolute;
  top: var(--dossier-notes-label-top, 58.5%);
  left: var(--dossier-notes-label-left, 12.1%);
  display: block;
  width: var(--dossier-notes-label-width, 70%);
  height: var(--dossier-notes-label-height, 5%);
  margin: 0;
  color: #0a3161;
  overflow: visible;
  font-size: clamp(0.46rem, 0.56vw, 0.66rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.miles-state-sheet__note textarea {
  position: absolute;
  top: var(--dossier-textarea-top, 63.9%);
  left: var(--dossier-textarea-left, 11.8%);
  width: var(--dossier-textarea-width, 79.4%);
  height: var(--dossier-textarea-height, 10%);
  min-height: 0;
  max-height: none;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid rgba(93, 61, 28, 0.62);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.82), rgba(239, 217, 171, 0.72));
  color: #2b190b;
  font: 0.82rem Georgia, "Times New Roman", serif;
  line-height: 1.22;
  box-shadow: inset 0 2px 5px rgba(64, 36, 12, 0.14);
}

.miles-state-sheet[data-planner-mode="goAgain"] .miles-state-sheet__note textarea {
  height: 13.8%;
}

.miles-state-sheet[data-planner-mode="stateStory"] .miles-state-sheet__note {
  display: none;
}

.miles-state-sheet__story-readout {
  position: absolute;
  top: var(--dossier-notes-label-top, 58.5%);
  left: var(--dossier-notes-label-left, 12.1%);
  width: var(--dossier-textarea-width, 79.4%);
  max-height: 15.5%;
  margin: 0;
  overflow: auto;
  color: #2b190b;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

.miles-state-sheet__story-readout[hidden] {
  display: none;
}

.miles-state-sheet__story-readout h3 {
  margin: 0 0 5px;
  color: #0a3161;
  font-size: clamp(0.46rem, 0.56vw, 0.66rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.miles-state-sheet__story-readout section {
  margin: 0 0 5px;
  padding: 5px 7px;
  border: 1px solid rgba(93, 61, 28, 0.3);
  border-radius: 2px;
  background: rgba(255, 250, 232, 0.62);
  box-shadow: inset 0 1px 3px rgba(64, 36, 12, 0.08);
}

.miles-state-sheet__story-readout strong {
  display: block;
  margin-bottom: 2px;
  color: #7c1930;
  font-size: clamp(0.38rem, 0.46vw, 0.54rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.miles-state-sheet__story-readout p {
  margin: 0;
  font-size: clamp(0.62rem, 0.72vw, 0.82rem);
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__tips,
.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__note {
  display: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] {
  top: 13%;
  left: 11%;
  width: 78%;
  min-width: 620px;
  max-width: 1060px;
  aspect-ratio: 1448 / 1086;
  background-image: url("assets/travel-desk/trapper-keeper.png");
  transform: translate(var(--my-plans-book-x, -1.7%), var(--my-plans-book-y, -12.4%)) rotate(var(--my-plans-book-rotation, -1deg)) scale(var(--my-plans-book-scale, 1));
  transform-origin: 50% 62%;
}

.miles-state-sheet[data-planner-mode="myPlans"].is-open {
  transform: translate(var(--my-plans-book-x, -1.7%), var(--my-plans-book-y, -12.4%)) rotate(var(--my-plans-book-rotation, -1deg)) scale(var(--my-plans-book-scale, 1));
}

/* Use only the repaired paper patch; keep the rest of the original artwork. */
.miles-state-sheet[data-planner-mode="myPlans"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/travel-desk/trapper-keeper-postmark-repair.png") center / contain no-repeat;
  clip-path: inset(66% 21% 25% 68%);
  pointer-events: none;
}

.miles-postmark-paper,
.miles-postmark-group {
  display: contents;
}

/* My Plans has no bottom status stamp or postal-wave decoration.
   Keep the repaired paper patch above: it covers waves baked into the artwork. */
.miles-state-sheet[data-planner-mode="myPlans"] .miles-postmark-paper,
.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__context {
  display: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__header {
  z-index: 46;
  top: var(--my-plans-title-top, 21%);
  left: var(--my-plans-title-left, 54.9%);
  width: var(--my-plans-title-width, 30%);
  min-height: var(--my-plans-title-height, 7%);
  pointer-events: none;
  transform: rotate(var(--my-plans-title-rotation, 4.8deg));
  transform-origin: 50% 50%;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__header h2 {
  color: #0a3161;
  font-size: clamp(1.08rem, 2vw, 2.14rem);
  line-height: 0.95;
}

.miles-plan-state-selector {
  display: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__header h2 {
  display: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-state-selector:not([hidden]) {
  display: block;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-state-selector {
  position: relative;
  width: 100%;
}

.miles-plan-state-selector__button {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) 18px;
  align-items: center;
  width: 100%;
  min-height: 28px;
  gap: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(97, 62, 24, 0.48);
  border-radius: 3px;
  background: #fff3d8;
  color: #0a3161;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.8rem, calc(var(--my-plans-selector-active-font-size, 1.5rem) * 0.7), 1.1rem);
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  pointer-events: auto;
}

.miles-plan-state-selector__button[data-title-length="medium"] {
  --my-plans-selector-length-factor: 0.86;
}

.miles-plan-state-selector__button[data-title-length="long"] {
  --my-plans-selector-length-factor: 0.68;
}

.miles-plan-state-selector__button[data-title-length="extra-long"] {
  --my-plans-selector-length-factor: 0.6;
}

.miles-plan-state-selector__button span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.miles-plan-state-selector__button:focus-visible {
  outline: 2px solid #0a3161;
  outline-offset: 3px;
}

.miles-plan-state-selector__indicator {
  content: "";
  justify-self: end;
  width: 0;
  height: 0;
  border-top: 7px solid #7c1930;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  pointer-events: none;
  transform: translate(var(--my-plans-selector-indicator-x, 0), var(--my-plans-selector-indicator-y, 0));
}

.miles-plan-state-selector__button:disabled {
  opacity: 1;
  cursor: default;
}

.miles-plan-state-selector__button:disabled .miles-plan-state-selector__indicator {
  display: none;
}

.miles-plan-state-selector__menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px + var(--my-plans-selector-menu-y, 0%));
  left: var(--my-plans-selector-menu-x, 0%);
  display: flex;
  flex-direction: column;
  width: var(--my-plans-selector-menu-width, 100%);
  max-height: min(26vh, 144px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3px;
  border: 1px solid rgba(97, 62, 24, 0.34);
  border-radius: 4px;
  background: rgba(255, 249, 232, 0.96);
  box-shadow: 0 4px 10px rgba(34, 20, 7, 0.18);
  pointer-events: auto;
}

.miles-plan-state-selector__menu[hidden] {
  display: none;
}

.miles-plan-state-selector__option {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #0a3161;
  font: 700 0.8rem/1.2 Georgia, "Times New Roman", serif;
  text-align: left;
  cursor: pointer;
}

.miles-plan-state-selector__option::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.miles-plan-state-selector__option[aria-selected="true"] {
  color: #7c1930;
}

.miles-plan-state-selector__option[aria-selected="true"]::before {
  background: #b58a3a;
  box-shadow: 0 0 0 2px rgba(181, 138, 58, 0.18);
}

.miles-plan-state-selector__option:hover,
.miles-plan-state-selector__option:focus-visible {
  background: rgba(10, 49, 97, 0.08);
  outline: none;
}

.miles-plan-state-selector__option:focus-visible {
  outline: 2px solid #0a3161;
  outline-offset: -2px;
}

.miles-state-sheet__context {
  position: absolute;
  top: 54.2%;
  left: 12.1%;
  width: 70%;
  max-height: 4.2%;
  margin: 0;
  overflow: hidden;
  color: #5a3514;
  font-size: clamp(0.42rem, 0.5vw, 0.58rem);
  line-height: 1.1;
}

.miles-state-sheet__context strong {
  color: #7c1930;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-state-sheet__context p {
  display: inline;
  margin: 0 0 0 5px;
}

.miles-state-sheet__plan-fields {
  position: absolute;
  top: 30.1%;
  left: 12.9%;
  width: 77.7%;
  height: 39%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__context {
  top: var(--my-plans-context-top, 79.1%);
  left: var(--my-plans-context-left, 51.9%);
  width: var(--my-plans-context-width, 34.1%);
  max-height: var(--my-plans-context-height, 4%);
  transform: rotate(var(--my-plans-context-rotation, 5.4deg));
  transform-origin: 50% 50%;
}

.miles-state-sheet__plan-fields[hidden] {
  display: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__plan-fields {
  inset: 0;
  display: block;
  width: auto;
  height: auto;
}

.miles-state-sheet__plan-fields label {
  display: grid;
  gap: 3px;
  min-height: 0;
  color: #7c1930;
  font-size: clamp(0.46rem, 0.58vw, 0.66rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.miles-state-sheet:not([data-planner-mode="myPlans"]) .miles-state-sheet__plan-fields label:first-child,
.miles-state-sheet:not([data-planner-mode="myPlans"]) .miles-state-sheet__plan-fields label:last-child {
  grid-column: 1 / -1;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field {
  position: absolute;
  gap: 4px;
  color: #7c1930;
  transform-origin: 50% 50%;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field--why {
  top: var(--my-plans-why-top, 27.9%);
  left: var(--my-plans-why-left, 54.1%);
  width: var(--my-plans-why-width, 34.7%);
  height: var(--my-plans-why-height, 14.2%);
  transform: rotate(var(--my-plans-why-rotation, 5.4deg));
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field--must-see {
  top: var(--my-plans-must-see-top, 44.4%);
  left: var(--my-plans-must-see-left, 53.3%);
  width: var(--my-plans-must-see-width, 34.5%);
  height: var(--my-plans-must-see-height, 8.2%);
  transform: rotate(var(--my-plans-must-see-rotation, 5.4deg));
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field--when {
  top: var(--my-plans-when-top, 54.1%);
  left: var(--my-plans-when-left, 52.8%);
  width: var(--my-plans-when-width, 34.3%);
  height: var(--my-plans-when-height, 8.2%);
  transform: rotate(var(--my-plans-when-rotation, 5.8deg));
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field--notes {
  top: var(--my-plans-trip-notes-top, 64.5%);
  left: var(--my-plans-trip-notes-left, 51.8%);
  width: var(--my-plans-trip-notes-width, 34.7%);
  height: var(--my-plans-trip-notes-height, 12.4%);
  transform: rotate(var(--my-plans-trip-notes-rotation, 6deg));
}

.miles-state-sheet__plan-fields input,
.miles-state-sheet__plan-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(103, 65, 26, 0.36);
  border-radius: 2px;
  background: rgba(255, 251, 235, 0.46);
  box-shadow: inset 0 2px 5px rgba(64, 36, 12, 0.12);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.62rem, 0.78vw, 0.86rem);
  line-height: 1.18;
}

.miles-state-sheet__plan-fields input {
  min-height: 29px;
  padding: 5px 7px;
}

.miles-state-sheet__plan-fields textarea {
  min-height: 48px;
  resize: none;
  padding: 6px 7px;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__plan-fields input,
.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__plan-fields textarea {
  height: 100%;
  min-height: 0;
  background: rgba(255, 251, 235, 0.34);
}

.miles-state-sheet__clippings-panel {
  display: contents;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__clippings-panel {
  position: absolute;
  display: block;
  z-index: 45;
  top: var(--my-plans-clippings-top, 26.2%);
  left: var(--my-plans-clippings-left, 16.8%);
  width: var(--my-plans-clippings-width, 29.2%);
  height: var(--my-plans-clippings-height, 52.3%);
  transform: rotate(var(--my-plans-clippings-rotation, 0deg));
  transform-origin: 50% 50%;
  pointer-events: none;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__clippings {
  inset: 0 0 auto;
  width: 100%;
  height: calc(100% - 56px);
  overflow-y: auto;
  transform: none;
}

.miles-state-sheet__clippings {
  position: absolute;
  z-index: 11;
  top: var(--my-plans-clippings-top, 26.2%);
  left: var(--my-plans-clippings-left, 16.8%);
  width: var(--my-plans-clippings-width, 29.2%);
  height: var(--my-plans-clippings-height, 52.3%);
  padding: 8px;
  overflow: hidden;
  color: #0a3161;
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: auto;
  transform: rotate(var(--my-plans-clippings-rotation, 0deg));
  transform-origin: 50% 50%;
}

.miles-state-sheet__clippings[hidden],
.miles-state-sheet__mixtape[hidden],
.miles-state-sheet__state-icon[hidden],
.miles-state-sheet__photo-slot[hidden] {
  display: none;
}

.miles-state-sheet__clippings span {
  display: block;
  margin-bottom: 6px;
  color: #7c1930;
  font-size: clamp(0.56rem, 0.72vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-state-sheet__clippings.is-empty span {
  opacity: 0.6;
}

.miles-state-sheet__clippings p,
.miles-state-sheet__clippings li {
  margin: 0;
  color: rgba(10, 49, 97, 0.78);
  font-size: clamp(0.58rem, 0.78vw, 0.86rem);
  line-height: 1.18;
}

.miles-state-sheet__clippings ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.1em;
}

.miles-clipping-stack {
  position: relative;
  height: calc(100% - 24px);
  min-height: 120px;
  margin-top: 7px;
}

.miles-clipping-card {
  display: grid;
  gap: 6px;
  width: 82%;
  min-height: 58%;
  padding: 10px 11px;
  border: 1px solid rgba(101, 64, 28, 0.24);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 251, 232, 0.96), rgba(237, 218, 178, 0.92));
  box-shadow:
    0 7px 12px rgba(45, 24, 8, 0.18),
    inset 0 -10px 20px rgba(165, 111, 44, 0.08);
  color: #2a1707;
}

.miles-clipping-card--backing {
  position: absolute;
  top: calc(10px + (var(--clip-layer) * 9px));
  left: calc(12px + (var(--clip-layer) * 5px));
  z-index: calc(4 - var(--clip-layer));
  min-height: 58%;
  padding: 0;
  opacity: 0.84;
  pointer-events: none;
  transform: rotate(calc((var(--clip-layer) - 2) * 3deg));
}

.miles-clipping-card--top {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  border: 0;
  text-align: left;
  cursor: pointer;
  transform: rotate(-2deg);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.miles-state-sheet__clippings.is-shuffling .miles-clipping-card--top {
  transform: translate(8px, 3px) rotate(1deg);
}

.miles-clipping-card--top:hover,
.miles-clipping-card--top:focus-visible {
  box-shadow:
    0 10px 15px rgba(45, 24, 8, 0.24),
    inset 0 -10px 20px rgba(165, 111, 44, 0.08);
  transform: translateY(-2px) rotate(-2deg);
}

.miles-clipping-card--top:focus-visible {
  outline: 2px solid rgba(124, 25, 48, 0.42);
  outline-offset: 3px;
}

.miles-clipping-card small,
.miles-clipping-card strong,
.miles-clipping-card p {
  display: block;
  overflow: hidden;
}

.miles-clipping-card small {
  color: #7c1930;
  font-size: clamp(0.42rem, 0.54vw, 0.62rem);
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.miles-clipping-card strong {
  color: #0a3161;
  font-size: clamp(0.7rem, 0.92vw, 1rem);
  line-height: 1;
}

.miles-clipping-card p {
  display: -webkit-box;
  color: rgba(42, 23, 7, 0.78);
  font-size: clamp(0.54rem, 0.68vw, 0.78rem);
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.miles-clipping-card__meta {
  display: flex;
  justify-content: flex-end;
}

.miles-clipping-card__actions {
  position: absolute;
  right: 9%;
  bottom: 7%;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 88%;
  transform: rotate(-2deg);
}

.miles-clipping-card__actions button,
.miles-clipping-detail button,
.miles-clipping-detail__link,
.miles-add-link-panel button,
.miles-mixtape-panel button {
  min-height: 18px;
  padding: 3px 5px;
  border: 1px solid rgba(89, 55, 22, 0.52);
  border-radius: 2px;
  background: rgba(255, 247, 220, 0.78);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.34rem, 0.44vw, 0.52rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-clipping-add-link {
  margin-top: 8px;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(89, 55, 22, 0.42);
  border-radius: 2px;
  background: rgba(255, 247, 220, 0.72);
  color: #7c1930;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.4rem, 0.5vw, 0.58rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-clipping-count {
  color: rgba(10, 49, 97, 0.64);
  font-size: clamp(0.38rem, 0.48vw, 0.56rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.miles-clipping-detail,
.miles-add-link-panel,
.miles-mixtape-panel {
  position: absolute;
  z-index: 16;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(94, 58, 25, 0.32);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.96), rgba(232, 212, 180, 0.94));
  box-shadow: 0 10px 20px rgba(36, 19, 8, 0.28);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
}

.miles-clipping-detail[hidden],
.miles-add-link-panel[hidden],
.miles-mixtape-panel[hidden] {
  display: none;
}

.miles-clipping-detail,
.miles-add-link-panel {
  top: 40%;
  left: 20%;
  width: 28%;
  max-height: 30%;
  overflow: auto;
  transform: rotate(-1deg);
}

.miles-add-link-panel {
  top: 37%;
  max-height: 42%;
}

.miles-mixtape-panel {
  top: 35%;
  left: 17%;
  width: 31%;
  max-height: 46%;
  overflow: auto;
  transform: rotate(0.8deg);
}

.miles-clipping-detail p,
.miles-add-link-panel h3,
.miles-add-link-panel p,
.miles-mixtape-panel h3 {
  margin: 0;
}

.miles-clipping-detail > p:first-child,
.miles-add-link-panel label span,
.miles-mixtape-panel label span {
  color: #7c1930;
  font-size: clamp(0.46rem, 0.58vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-clipping-detail h3,
.miles-add-link-panel h3,
.miles-mixtape-panel h3 {
  margin: 0;
  color: #0a3161;
  font-size: clamp(0.76rem, 1vw, 1.1rem);
  line-height: 1;
  text-transform: uppercase;
}

.miles-clipping-detail p {
  font-size: clamp(0.58rem, 0.72vw, 0.84rem);
  line-height: 1.28;
}

.miles-clipping-detail__link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  text-decoration: none;
}

.miles-clipping-detail__link[hidden] {
  display: none;
}

.miles-add-link-panel label,
.miles-mixtape-panel label {
  display: grid;
  gap: 2px;
}

.miles-add-link-panel input,
.miles-add-link-panel textarea,
.miles-mixtape-panel input {
  width: 100%;
  min-height: 24px;
  border: 1px solid rgba(103, 65, 26, 0.36);
  border-radius: 2px;
  background: rgba(255, 251, 235, 0.64);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.58rem, 0.72vw, 0.82rem);
}

.miles-add-link-panel textarea {
  min-height: 52px;
  resize: none;
}

.miles-add-link-panel p {
  color: #7c1930;
  font-size: clamp(0.46rem, 0.58vw, 0.64rem);
  font-weight: 900;
  line-height: 1.08;
}

.miles-add-link-panel div {
  display: flex;
  gap: 6px;
}

.miles-state-sheet__mixtape {
  position: absolute;
  z-index: 12;
  top: var(--my-plans-mixtape-top, 68.7%);
  left: var(--my-plans-mixtape-left, 10.9%);
  width: var(--my-plans-mixtape-width, 16%);
  height: var(--my-plans-mixtape-height, 10%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8d4b4;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  transform: rotate(var(--my-plans-mixtape-rotation, -4deg));
  transform-origin: 50% 50%;
  filter: drop-shadow(0 6px 8px rgba(36, 19, 8, 0.28));
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.miles-state-sheet__mixtape:hover,
.miles-state-sheet__mixtape:focus-visible,
.miles-state-sheet__mixtape.is-selected {
  filter: drop-shadow(0 9px 12px rgba(36, 19, 8, 0.34));
  transform: translateY(-2px) rotate(var(--my-plans-mixtape-rotation, -4deg));
}

.miles-state-sheet__mixtape:focus-visible {
  outline: 2px solid rgba(232, 212, 180, 0.86);
  outline-offset: 2px;
}

.miles-state-sheet__mixtape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.miles-state-sheet__mixtape span {
  position: absolute;
  right: 8%;
  bottom: 7%;
  padding: 2px 4px;
  border-radius: 2px;
  background: rgba(10, 49, 97, 0.72);
  color: #fff4df;
  font-size: clamp(0.42rem, 0.52vw, 0.58rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.miles-state-sheet__state-icon {
  position: absolute;
  z-index: 48;
  top: var(--my-plans-state-icon-top, 82.6%);
  left: var(--my-plans-state-icon-left, 66.4%);
  width: var(--my-plans-state-icon-width, 8.6%);
  height: var(--my-plans-state-icon-height, 10.8%);
  display: grid;
  grid-template-rows: minmax(0, 0.5fr) auto minmax(5px, 0.5fr);
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint, #9fcdb1);
  font-size: clamp(0.82rem, 1.42vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: auto;
  cursor: pointer;
  filter:
    drop-shadow(0 0 10px rgba(232, 184, 91, 0.22))
    drop-shadow(0 4px 8px rgba(31, 14, 4, 0.18));
  transform: rotate(var(--my-plans-state-icon-rotation, 1deg));
  transform-origin: 50% 50%;
  transition: filter 160ms ease;
}

.miles-state-sheet__state-icon-visual {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
  filter: drop-shadow(0 1px 0 rgba(255, 249, 230, 0.46));
  transition: filter 160ms ease, transform 160ms ease;
}

.miles-state-sheet__state-icon svg {
  width: 74%;
  height: 74%;
}

.miles-state-sheet__state-icon-label {
  width: 100%;
  min-width: 0;
  color: #f5d88e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.55rem, 0.7vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.1;
  text-align: center;
  background: transparent;
  padding: 0;
  border: 0;
  text-transform: uppercase;
  transition: color 160ms ease, transform 160ms ease;
}

.miles-state-sheet__state-icon::after {
  content: "";
}

.miles-state-sheet__state-icon:hover,
.miles-state-sheet__state-icon:focus-visible {
  filter:
    drop-shadow(0 0 15px rgba(232, 184, 91, 0.36))
    drop-shadow(0 6px 10px rgba(31, 14, 4, 0.22));
}

.miles-state-sheet__state-icon:hover .miles-state-sheet__state-icon-visual,
.miles-state-sheet__state-icon:focus-visible .miles-state-sheet__state-icon-visual {
  filter: drop-shadow(0 2px 3px rgba(124, 25, 48, 0.42)) drop-shadow(0 0 8px rgba(159, 205, 177, 0.42));
  transform: translateY(-1px);
}

.miles-state-sheet__state-icon:hover .miles-state-sheet__state-icon-label,
.miles-state-sheet__state-icon:focus-visible .miles-state-sheet__state-icon-label {
  color: #ffe7ac;
  transform: translateY(-1px);
}

.miles-state-sheet__state-icon:focus-visible {
  outline: 2px solid #f5d88e;
  outline-offset: 3px;
}

.miles-state-sheet__photo-slot {
  position: absolute;
  top: var(--my-plans-photo-top, 76.9%);
  left: var(--my-plans-photo-left, 77%);
  width: var(--my-plans-photo-width, 13.9%);
  height: var(--my-plans-photo-height, 13.2%);
  border: 0;
  background: transparent;
  transform: rotate(var(--my-plans-photo-rotation, 8deg));
  transform-origin: 50% 50%;
  color: rgba(10, 49, 97, 0.5);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.52rem, 0.7vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-state-sheet__photo-slot img {
  position: absolute;
  inset: 16% 11% 24%;
  width: 78%;
  height: 60%;
  object-fit: cover;
  border-radius: 1px;
  filter: saturate(0.96) contrast(1.02);
}

.miles-state-sheet__photo-slot span {
  position: relative;
  z-index: 1;
}

.miles-state-sheet__photo-slot.has-photo {
  color: rgba(124, 25, 48, 0.72);
}

.miles-state-sheet__photo-slot.has-photo [data-plan-photo-change] {
  position: absolute;
  right: 12%;
  bottom: 9%;
  font-size: clamp(0.34rem, 0.44vw, 0.5rem);
}

.miles-state-sheet__photo-slot.is-rejected {
  color: var(--red, #bf0d3e);
}

.miles-state-sheet__photo-remove {
  position: absolute;
  z-index: 13;
  top: calc(var(--my-plans-photo-top, 76.9%) + var(--my-plans-photo-height, 13.2%) - 2.3%);
  left: calc(var(--my-plans-photo-left, 77%) + 1.4%);
  min-height: 18px;
  padding: 2px 5px;
  border: 1px solid rgba(89, 55, 22, 0.38);
  border-radius: 2px;
  background: rgba(255, 247, 220, 0.74);
  color: rgba(124, 25, 48, 0.82);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.34rem, 0.42vw, 0.48rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(var(--my-plans-photo-rotation, 8deg));
  transform-origin: 50% 50%;
  cursor: pointer;
}

.miles-state-sheet__actions {
  position: absolute;
  top: var(--dossier-actions-top, 76.1%);
  left: var(--dossier-actions-left, 11.9%);
  width: var(--dossier-actions-width, 79.4%);
  height: var(--dossier-actions-height, 9.2%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__actions {
  top: auto;
  right: 3%;
  bottom: 8px;
  left: auto;
  width: 60%;
  height: 36px;
  pointer-events: auto;
  z-index: 45;
  transform: rotate(var(--my-plans-actions-rotation, -1deg));
  transform-origin: 50% 50%;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__file {
  display: none;
}

.miles-state-svg-source {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.miles-state-sheet__actions button {
  min-height: 28px;
  height: 28px;
  padding-top: 5px;
  padding-bottom: 5px;
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.54rem, 0.64vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__actions button {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 32px;
  padding: 4px 5px;
  font-size: clamp(0.58rem, 0.65vw, 0.72rem);
  white-space: normal;
  color: #000;
  background: linear-gradient(180deg, #efd291, #c5964b);
  border: 1px solid #956c30;
  box-shadow: 0 2px 4px rgba(39, 14, 8, 0.16);
}

.miles-state-sheet__add {
  padding: 6px 11px;
  border: 1px solid rgba(73, 24, 38, 0.72);
  background: linear-gradient(180deg, #bf0d3e, #7d0d2d);
  color: #fff4df;
  box-shadow:
    0 6px 10px rgba(39, 14, 8, 0.22),
    inset 0 1px 0 rgba(255, 235, 208, 0.28);
}

.miles-state-sheet__add.is-added {
  background: linear-gradient(180deg, #8b5b22, #593511);
}

.miles-state-sheet__add:disabled {
  cursor: default;
}

.miles-state-sheet__visit-again {
  padding: 6px 11px;
  border: 1px solid rgba(10, 49, 97, 0.72);
  background: linear-gradient(180deg, #f5df9d, #bd8231);
  color: #2a1707;
  box-shadow:
    0 5px 8px rgba(39, 14, 8, 0.18),
    inset 0 1px 0 rgba(255, 249, 231, 0.38);
}

.miles-state-sheet__visit-again[hidden] {
  display: none;
}

.miles-state-sheet__visit-again.is-added {
  background: linear-gradient(180deg, #e8d4b4, #b77a2a);
  color: #0a3161;
}

.miles-state-sheet__visit-again:disabled {
  cursor: default;
}

.miles-state-sheet__file {
  padding: 6px 10px;
  border: 1px solid rgba(89, 55, 22, 0.7);
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #2a1707;
}

.miles-remove-plan-confirm {
  position: fixed;
  z-index: 70;
  inset: 0;
  margin: auto;
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(94, 58, 25, 0.38);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.97), rgba(232, 212, 180, 0.95));
  box-shadow: 0 10px 20px rgba(36, 19, 8, 0.25);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  transform: none;
}
.miles-remove-plan-confirm::backdrop { background: #04182bb3; }
.miles-remove-plan-confirm :focus-visible { outline: 3px solid #0a3161; outline-offset: 3px; }

.miles-remove-plan-confirm[hidden] {
  display: none;
}

.miles-remove-plan-confirm p,
.miles-remove-plan-confirm span {
  margin: 0;
}

.miles-remove-plan-confirm p {
  color: #7c1930;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.miles-remove-plan-confirm span {
  color: rgba(42, 23, 7, 0.82);
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-line;
}

.miles-remove-plan-confirm div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.miles-remove-plan-confirm button {
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid rgba(89, 55, 22, 0.52);
  border-radius: 2px;
  background: rgba(255, 247, 220, 0.82);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-remove-plan-confirm [data-confirm-remove-plan] {
  border-color: rgba(73, 24, 38, 0.68);
  background: linear-gradient(180deg, #bf0d3e, #7d0d2d);
  color: #fff4df;
}

.miles-tip-detail-sheet {
  position: absolute;
  z-index: 10;
  top: 26%;
  left: 31%;
  width: 46%;
  min-width: 430px;
  max-width: 720px;
  max-height: min(70%, calc(100dvh - 130px));
  aspect-ratio: 1448 / 1086;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/travel-desk/travel-briefing-background.png") center / contain no-repeat;
  box-shadow: none;
  color: #34200e;
  font-family: Georgia, "Times New Roman", serif;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate(3%, 12%) rotate(0.8deg) scale(0.96);
  transform-origin: 28% 100%;
  transition:
    opacity 180ms ease,
    transform 300ms cubic-bezier(0.2, 0.82, 0.24, 1);
}

.miles-tip-detail-sheet__safe-area {
  position: absolute;
  top: var(--briefing-safe-top, 18.8%);
  left: var(--briefing-safe-left, 19.5%);
  width: var(--briefing-safe-width, 63.4%);
  height: var(--briefing-safe-height, 75.5%);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.miles-tip-detail-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -4%) rotate(0.8deg) scale(1);
}

.miles-tip-detail-sheet:focus-visible {
  outline: 2px solid rgba(232, 212, 180, 0.94);
  outline-offset: 3px;
}

.miles-tip-detail-sheet__clip {
  display: none;
}

.miles-tip-detail-sheet__state {
  flex: 0 0 auto;
  width: 35%;
  margin: 0;
  color: #7c1930;
  font-size: clamp(0.6rem, 0.72vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.miles-tip-detail-sheet h2 {
  flex: 0 0 auto;
  width: 68%;
  margin: clamp(5px, 0.7vw, 9px) 0 0;
  color: #0a3161;
  font-size: clamp(1.15rem, 1.7vw, 1.85rem);
  line-height: 1;
  text-transform: uppercase;
}

.miles-tip-detail-sheet__body {
  flex: 0 0 var(--briefing-reading-height, 46.5%);
  width: var(--briefing-reading-width, 98.3%);
  height: auto;
  min-height: 0;
  margin-top: var(--briefing-reading-margin-top, 2.5%);
  margin-left: var(--briefing-reading-left, -2.1%);
  overflow: auto;
  padding: 10px 12px 16px;
  border-left: 3px solid rgba(191, 13, 62, 0.48);
  background: rgba(255, 251, 235, 0.36);
  font-size: clamp(0.76rem, 0.9vw, 1rem);
  line-height: 1.45;
}

.miles-layout-workshop-panel {
  position: fixed;
  z-index: 50;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(58dvh, 520px);
  padding: 10px;
  border: 1px solid rgba(232, 212, 180, 0.6);
  border-radius: 4px;
  background: rgba(4, 24, 43, 0.92);
  color: #fff9ef;
  font: 12px/1.35 Arial, sans-serif;
  pointer-events: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.miles-layout-workshop-panel h2 {
  margin: 0;
  color: #e8d4b4;
  font: 800 13px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-layout-workshop-panel pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(232, 212, 180, 0.24);
  background: rgba(0, 0, 0, 0.25);
  color: #fff9ef;
  font-size: 11px;
  white-space: pre-wrap;
}

.miles-layout-workshop-panel button {
  min-height: 32px;
  border: 1px solid rgba(232, 212, 180, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #231304;
  font: 800 12px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-my-plans-workshop-toolbar {
  position: fixed;
  z-index: 70;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: min(620px, calc(100vw - 24px));
  padding: 7px;
  border: 1px solid rgba(232, 212, 180, 0.54);
  border-radius: 4px;
  background: rgba(4, 24, 43, 0.82);
  color: #fff9ef;
  font: 11px/1.2 Arial, sans-serif;
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.miles-my-plans-workshop-toolbar button,
.miles-my-plans-workshop-toolbar select {
  min-height: 28px;
  border: 1px solid rgba(232, 212, 180, 0.5);
  border-radius: 3px;
  background: rgba(255, 249, 239, 0.94);
  color: #231304;
  font: 800 10px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.miles-my-plans-workshop-toolbar button {
  padding: 0 8px;
  cursor: pointer;
}

.miles-my-plans-workshop-toolbar button.is-active {
  background: linear-gradient(180deg, #e3bb68, #a9712a);
}

.miles-my-plans-workshop-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
}

.miles-my-plans-workshop-toolbar output {
  min-width: min(260px, 100%);
  color: #fff9ef;
  font: 11px/1.25 Consolas, "Courier New", monospace;
}

.miles-my-plans-workshop-reopen {
  position: fixed;
  z-index: 70;
  right: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(232, 212, 180, 0.56);
  border-radius: 3px;
  background: rgba(4, 24, 43, 0.76);
  color: #fff9ef;
  font: 800 10px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-ticket-workshop-panel {
  position: fixed;
  z-index: 60;
  right: 10px;
  bottom: 10px;
  display: grid;
  gap: 8px;
  width: min(350px, calc(100vw - 20px));
  max-height: min(54dvh, 440px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(232, 212, 180, 0.62);
  border-radius: 4px;
  background: rgba(4, 24, 43, 0.94);
  color: #fff9ef;
  font: 12px/1.35 Arial, sans-serif;
  pointer-events: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.miles-ticket-workshop-panel.is-collapsed {
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border-color: rgba(232, 212, 180, 0.72);
}

.miles-ticket-workshop-panel__toggle {
  display: none;
}

.miles-ticket-workshop-panel.is-collapsed .miles-ticket-workshop-panel__toggle,
.miles-ticket-workshop-panel__toggle {
  display: block;
  min-width: 150px;
}

.miles-ticket-workshop-panel.is-collapsed > :not(.miles-ticket-workshop-panel__toggle) {
  display: none;
}

.miles-ticket-workshop-panel h2 {
  margin: 0;
  color: #e8d4b4;
  font: 800 13px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miles-ticket-workshop-panel label {
  display: grid;
  gap: 4px;
}

.miles-ticket-workshop-panel input[type="range"] {
  width: 100%;
}

.miles-ticket-workshop-panel output,
.miles-ticket-workshop-panel pre {
  color: #fff9ef;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.miles-ticket-workshop-panel pre {
  max-height: 110px;
  margin: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(232, 212, 180, 0.24);
  background: rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
}

.miles-ticket-workshop-panel button {
  min-height: 30px;
  border: 1px solid rgba(232, 212, 180, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #231304;
  font: 800 12px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.miles-ticket-workshop-panel__sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

body.is-ticket-workshop .miles-page {
  width: min(var(--ticket-workshop-preview-width, 390px), calc(100vw - 20px));
  padding-right: 6px;
  padding-left: 6px;
}

body.is-ticket-workshop .miles-scene {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  margin-bottom: 150px;
  overflow: visible;
}

body.is-ticket-workshop .miles-scene::after {
  content: "";
  position: absolute;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px dashed rgba(191, 13, 62, 0.9);
  pointer-events: none;
}

body.is-ticket-workshop .miles-overlay-coordinate-layer {
  overflow: visible;
}

body.is-ticket-workshop .miles-scene-plate {
  object-fit: contain;
}

body.is-ticket-workshop .miles-return-ticket {
  top: calc(100% + var(--ticket-mobile-anchor-y, 0px));
  left: calc(50% + var(--ticket-mobile-x-offset, 0px));
  width: var(--ticket-workshop-ticket-width, var(--ticket-mobile-width, 32vw));
  min-width: 0;
  outline: 1px dashed rgba(191, 13, 62, 0.85);
  outline-offset: 3px;
  transform: translateX(-50%) rotate(var(--ticket-mobile-rotation, -3deg));
}

body.is-ticket-workshop .miles-return-ticket:hover,
body.is-ticket-workshop .miles-return-ticket:focus-visible,
body.is-ticket-workshop .miles-return-ticket.is-open {
  transform: translateX(-50%) translateY(-4px) rotate(var(--ticket-mobile-hover-rotation, -2deg));
}

body.is-ticket-workshop .miles-ticket-workshop-panel {
  position: static;
  width: min(var(--ticket-workshop-preview-width, 390px), calc(100vw - 28px));
  max-height: none;
  margin: 12px auto 24px;
  overflow: visible;
}

body.is-ticket-workshop .miles-ticket-workshop-panel.is-collapsed {
  width: min(190px, calc(100vw - 28px));
  margin-top: 8px;
}

.miles-workshop-layer {
  position: absolute;
  z-index: 40;
  inset: 0;
  pointer-events: none;
}

.miles-workshop-zone {
  position: absolute;
  z-index: 41;
  border: 1px solid rgba(0, 117, 255, 0.95);
  background: rgba(0, 117, 255, 0.08);
  color: #061525;
  pointer-events: none;
  touch-action: none;
}

.miles-workshop-zone[data-workshop-group="briefing"] {
  border-color: rgba(191, 13, 62, 0.95);
  background: rgba(191, 13, 62, 0.08);
}

.miles-workshop-zone[data-workshop-group="myPlans"] {
  border-color: rgba(227, 187, 104, 0.96);
  background: rgba(227, 187, 104, 0.12);
}

body.is-my-plans-workshop .miles-workshop-layer {
  z-index: 40;
  pointer-events: none;
}

body.is-my-plans-workshop .miles-workshop-zone {
  border-color: transparent;
  background: transparent;
  cursor: move;
  pointer-events: auto;
}

body.is-my-plans-workshop .miles-workshop-zone:hover {
  border-color: rgba(227, 187, 104, 0.42);
  background: rgba(227, 187, 104, 0.04);
}

body.is-my-plans-workshop .miles-workshop-zone.is-selected {
  border-color: rgba(227, 187, 104, 0.95);
  background: rgba(227, 187, 104, 0.05);
  outline: 1px solid rgba(4, 24, 43, 0.32);
  transform: rotate(var(--zone-rotation, 0deg));
}

body.is-my-plans-workshop .miles-workshop-zone__name {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  display: none;
  max-width: 100%;
  padding: 2px 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(4, 24, 43, 0.78);
  color: #fff9ef;
  font: 700 10px/1.15 Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-my-plans-workshop .miles-workshop-zone.is-selected .miles-workshop-zone__name {
  display: block;
}

body.is-my-plans-workshop .miles-workshop-zone__resize,
body.is-my-plans-workshop .miles-workshop-zone__rotate {
  display: none;
}

body.is-my-plans-workshop .miles-workshop-zone.is-selected .miles-workshop-zone__resize,
body.is-my-plans-workshop .miles-workshop-zone.is-selected .miles-workshop-zone__rotate {
  display: block;
}

body.is-my-plans-workshop .miles-workshop-zone__rotate {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 249, 239, 0.96);
  border-radius: 999px;
  background: #0a3161;
  cursor: grab;
  pointer-events: auto;
  transform: translateX(-50%);
}

body.is-my-plans-workshop .miles-workshop-zone__rotate::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  height: 11px;
  border-left: 1px solid rgba(10, 49, 97, 0.55);
}

body.is-my-plans-workshop .miles-workshop-book-handle {
  display: none;
}

body.is-my-plans-workshop .miles-state-sheet.is-workshop-book-selected {
  z-index: 60;
  outline: 1px solid rgba(227, 187, 104, 0.9);
  outline-offset: 4px;
}

body.is-my-plans-workshop .miles-state-sheet.is-workshop-book-selected .miles-workshop-layer {
  pointer-events: auto;
}

body.is-my-plans-workshop .miles-state-sheet.is-workshop-book-selected .miles-workshop-zone {
  pointer-events: none;
}

body.is-my-plans-workshop .miles-state-sheet.is-workshop-book-selected .miles-workshop-book-handle {
  position: absolute;
  z-index: 69;
  display: block;
  border: 2px solid rgba(255, 249, 239, 0.96);
  background: #bf0d3e;
  pointer-events: auto;
}

body.is-my-plans-workshop .miles-workshop-book-handle--resize {
  right: 8px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

body.is-my-plans-workshop .miles-workshop-book-handle--rotate {
  top: -34px;
  left: 50%;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  cursor: grab;
  transform: translateX(-50%);
}

body.is-my-plans-workshop-hidden .miles-workshop-layer,
body.is-my-plans-workshop-hidden .miles-state-sheet.is-workshop-book-selected {
  outline: none;
  visibility: hidden;
}

.miles-workshop-zone__label {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  padding: 2px 4px;
  overflow: hidden;
  background: rgba(255, 249, 239, 0.9);
  color: #061525;
  font: 700 10px/1.15 Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: move;
  pointer-events: auto;
  transform: translateY(-100%);
}

.miles-workshop-zone__resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 249, 239, 0.95);
  background: #bf0d3e;
  cursor: nwse-resize;
  pointer-events: auto;
}

.miles-tip-detail-sheet__body p {
  margin: 0 0 0.7em;
}

.miles-tip-detail-sheet__body p:last-child {
  margin-bottom: 0;
}

.miles-tip-detail-sheet__body a {
  color: #0a3161;
  font-weight: 900;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.miles-tip-detail-sheet__safe-area:has(> .miles-tip-detail-sheet__bridge:not([hidden])) :is(.miles-tip-detail-sheet__state, h2) {
  width: 100%;
}

.miles-tip-detail-sheet__safe-area:has(> .miles-tip-detail-sheet__bridge:not([hidden])) .miles-tip-detail-sheet__body {
  flex: 1 1 auto;
}

.miles-tip-detail-sheet__bridge {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 6px 0 0;
  color: rgba(51, 32, 14, 0.86);
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  line-height: 1.35;
}

.miles-tip-detail-sheet__bridge[hidden] {
  display: none;
}

.miles-tip-detail-sheet__bridge a {
  width: fit-content;
  color: #0a3161;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.miles-tip-detail-sheet__bridge a:focus-visible {
  outline: 2px solid rgba(10, 49, 97, 0.62);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .miles-tip-detail-sheet__safe-area:has(> .miles-tip-detail-sheet__bridge:not([hidden])) .miles-tip-detail-sheet__body {
    padding: 8px 10px;
  }

  .miles-tip-detail-sheet__bridge {
    gap: 2px 6px;
    font-size: 0.7rem;
  }
}

.miles-tip-detail-sheet__return {
  flex: 0 0 auto;
  align-self: flex-start;
  justify-self: start;
  margin-top: clamp(8px, 1.2vw, 14px);
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(89, 55, 22, 0.7);
  border-radius: 2px;
  background: linear-gradient(180deg, #e3bb68, #a9712a);
  color: #2a1707;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

@keyframes miles-folder-to-desk {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-2deg) scale(0.82);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(245%, 60%) rotate(2deg) scale(1.08);
  }
}

@keyframes miles-file-transfer {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-5deg) scale(0.86);
  }

  10% {
    opacity: 1;
  }

  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--transfer-x, 0px), var(--transfer-y, 0px)) rotate(10deg) scale(0.56);
  }
}

.miles-plane-window {
  --miles-plane-raise: clamp(30px, 7.2vw, 88px);
  --miles-plane-scale: 0.70;
  --miles-plane-start-x: calc(-100% - clamp(24px, 4vw, 40px));
  --miles-plane-glass-left-inset: clamp(18px, 2.4vw, 34px);
  position: absolute;
  z-index: 2;
  top: 10%;
  left: 58%;
  width: 42%;
  height: 58%;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--miles-plane-glass-left-inset));
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.miles-plane-window.is-taking-off {
  opacity: 1;
}

.miles-plane-track {
  position: absolute;
  top: calc(78% - var(--miles-plane-raise));
  left: 0;
  width: 128%;
  height: 45%;
  transform: translate(var(--miles-plane-start-x), -50%) scale(var(--miles-plane-scale, 1));
  transform-origin: center;
}

.miles-plane-window.is-taking-off .miles-plane-track {
  animation: miles-plane-cycle 5870ms linear forwards;
}

.miles-plane-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  filter: url("#miles-plane-green-screen");
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

@keyframes miles-plane-cycle {
  from {
    transform: translate(var(--miles-plane-start-x), -50%) scale(var(--miles-plane-scale, 1));
  }

  to {
    transform: translate(32%, -50%) scale(var(--miles-plane-scale, 1));
  }
}

@media (min-width: 1181px) {
  .miles-scene {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .miles-tip-detail-sheet {
    max-height: min(52%, calc(100dvh - 190px));
  }

  .miles-tip-detail-sheet__body {
    max-height: none;
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) {
  :root {
    --miles-scene-height: min(100dvh - 92px, calc((100vw - var(--app-shell-rail-width, 0px) - 28px) * 0.61));
    --miles-plate-scale: 1.08;
    --miles-plate-x: 50%;
    --miles-plate-y: 51%;
  }

  .miles-plane-window {
    --miles-plane-scale: 0.62;
  }

  .miles-scene {
    min-height: 500px;
  }
}

@media (min-width: 761px) and (orientation: portrait) {
  :root {
    --miles-scene-height: min(100dvh - 112px, 880px);
    --miles-plate-scale: 1.12;
    --miles-plate-x: 44%;
    --miles-plate-y: 51%;
  }

  .miles-plane-window {
    --miles-plane-scale: 0.50;
  }

  .miles-scene {
    min-height: 780px;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  :root {
    --miles-scene-height: min(100dvh - 20px, calc(100vw * 0.52));
    --miles-plate-scale: 1.2;
    --miles-plate-x: 48%;
    --miles-plate-y: 53%;
  }

  .miles-plane-window {
    --miles-plane-scale: 0.50;
  }

  .miles-page {
    padding: 8px;
  }

  .miles-travel-bureau {
    min-height: auto;
  }

  .miles-scene-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .miles-scene {
    min-height: 340px;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  :root {
    --miles-scene-height: auto;
    --miles-plate-scale: 1;
    --miles-plate-x: 50%;
    --miles-plate-y: 50%;
  }

  .miles-page {
    width: min(100% - 12px, 1220px);
    padding: 0 6px 12px;
  }

  .miles-travel-bureau {
    gap: 8px;
    min-height: calc(100dvh - 58px);
  }

  .miles-scene-copy {
    padding-top: 8px;
  }

  .miles-scene-copy h1 {
    font-size: clamp(1.2rem, 8vw, 1.8rem);
  }

  .miles-room-hint {
    margin-top: 0;
  }

  .miles-scene {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    margin-bottom: 430px;
    overflow: visible;
    background:
      radial-gradient(circle at 50% 50%, rgba(232, 212, 180, 0.14), transparent 66%),
      #082c4b;
  }

  .miles-scene-plate {
    object-fit: contain;
  }

  .miles-plane-window {
    --miles-plane-scale: 0.43;
    top: 5%;
    left: 58%;
    width: 42%;
    height: 58%;
  }

  .miles-filing-drawer {
    top: 44%;
    left: 5%;
    width: 44%;
    height: 28%;
    min-width: 150px;
    min-height: 92px;
  }

  .miles-state-folder {
    min-width: 72px;
    min-height: 42px;
    padding: 12px 7px 7px;
  }

  .miles-drawer-index {
    top: 18%;
    right: -30%;
    width: 34px;
    gap: 2px;
  }

  .miles-drawer-index__tab {
    min-width: 30px;
    min-height: 24px;
    padding: 5px 4px 3px;
    font-size: 0.48rem;
  }

  .miles-folder-stack {
    inset: 36% 14% 23% 5%;
  }

  .miles-drawer-paging {
    gap: 4px;
  }

  .miles-drawer-paging button {
    min-height: 23px;
    padding: 3px 4px;
    font-size: 0.42rem;
  }

  .miles-filing-drawer__close {
    min-height: 30px;
    padding: 3px 6px;
    font-size: 0.5rem;
  }

  .miles-folder-transfer {
    min-width: 58px;
    min-height: 34px;
    padding: 10px 7px 6px;
  }

  .miles-plan-transfer {
    min-width: 56px;
    min-height: 34px;
    padding: 10px 7px 6px;
  }

  .miles-plans-basket-hotspot {
    top: 55%;
    left: 70%;
    width: 28%;
    height: 30%;
    min-width: 82px;
    min-height: 56px;
  }

  .miles-plans-basket-hotspot__label {
    right: 1%;
    min-width: 112px;
    font-size: 0.5rem;
  }

  .miles-my-plans-workspace {
    top: calc(100% + 70px);
    left: 4%;
    width: 92%;
    min-width: 0;
    max-width: none;
  }

  .miles-my-plans-workspace__surface {
    min-height: 208px;
    padding: 22px 16px 16px;
  }

  .miles-my-plans-workspace h2 {
    font-size: clamp(1rem, 6vw, 1.35rem);
  }

  .miles-my-plans-list {
    gap: 4px;
    max-height: 152px;
    margin-top: 7px;
  }

  .miles-my-plans-state {
    min-height: 31px;
    padding: 4px 6px;
  }

  .miles-return-ticket {
    top: calc(100% + var(--ticket-mobile-anchor-y, -39px));
    left: calc(50% + var(--ticket-mobile-x-offset, -4px));
    width: var(--ticket-mobile-width, 11vw);
    min-width: 0;
    transform: translateX(-50%) rotate(var(--ticket-mobile-rotation, -3deg));
  }

  .miles-return-ticket:hover,
  .miles-return-ticket:focus-visible,
  .miles-return-ticket.is-open {
    transform: translateX(-50%) translateY(-4px) rotate(var(--ticket-mobile-hover-rotation, -2deg));
  }

  .miles-return-ticket__hint {
    right: 3%;
    bottom: calc(100% + 5px);
    min-width: 104px;
    padding: 4px 6px;
    font-size: 0.5rem;
  }

  .miles-go-again-workspace__surface {
    padding: 20px;
  }

  .miles-go-again-workspace__surface::after {
    top: 12px;
    right: 12px;
    width: 64px;
  }

  .miles-go-again-workspace h2 {
    font-size: 1.6rem;
  }

  .miles-go-again-list {
    gap: 4px;
    margin-top: 7px;
  }

  .miles-state-sheet {
    top: calc(100% + 14px);
    left: 0;
    width: 100%;
    min-width: 0;
    max-height: none;
    padding: 0;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] {
    top: calc(100% + 8px);
    left: -4%;
    width: 108%;
    min-width: 0;
    max-width: none;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__header {
    top: 16.8%;
    left: 53%;
    width: 38%;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-state-selector__button {
    min-height: 24px;
    grid-template-columns: minmax(0, 1fr) 10px;
    padding: 4px 6px;
    gap: 4px;
    font-size: clamp(0.65rem, 3vw, 0.75rem);
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-state-selector__menu {
    width: max(100%, 140px);
    left: auto;
    right: 0;
    max-height: 116px;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-state-selector__option {
    min-height: 34px;
    font-size: 0.8rem;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__actions {
    width: 60%;
    height: 44px;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__actions button {
    min-height: 36px;
  }

  .miles-state-sheet__state-icon {
    left: 63.7%;
    width: 14%;
    min-height: 40px;
  }

  body.is-my-plans-workshop .miles-layout-workshop-panel {
    position: static;
    width: min(360px, calc(100vw - 20px));
    max-height: none;
    margin: 12px auto 24px;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-plan-field {
    gap: 2px;
    font-size: 0.42rem;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__clippings {
    padding: 5px;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__clippings p,
  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__clippings li {
    font-size: 0.5rem;
  }

  .miles-state-sheet__stamp {
    top: 9%;
    left: 59%;
    right: auto;
    font-size: 0.5rem;
  }

  .miles-state-sheet[data-planner-mode="myPlans"] .miles-state-sheet__stamp {
    font-size: 0.9vw;
  }

  .miles-state-sheet__header p {
    font-size: 0.5rem;
  }

  .miles-state-sheet__header h2 {
    margin-bottom: 5px;
    font-size: clamp(1rem, 5.8vw, 1.45rem);
  }

  .miles-state-sheet__tips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .miles-tip-preview {
    min-height: 58px;
    padding: 3px 4px;
  }

  .miles-tip-preview__label {
    font-size: 0.48rem;
  }

  .miles-state-sheet__tips p {
    font-size: 0.52rem;
    line-height: 1.1;
  }

  .miles-tip-preview__cue {
    font-size: 0.42rem;
  }

  .has-saved-field-notes .miles-tip-preview {
    min-height: 0;
    padding: 1px 4px;
  }

  .has-saved-field-notes .miles-tip-preview__label {
    margin-bottom: 0;
  }

  .has-saved-field-notes .miles-tip-preview__cue {
    display: none;
  }

  .miles-state-sheet__note {
    margin-top: 4px;
  }

  .miles-state-sheet__note span {
    margin-bottom: 2px;
    font-size: 0.48rem;
  }

  .miles-state-sheet__note textarea {
    min-height: 28px;
    max-height: 34px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .miles-state-sheet__plan-fields {
    gap: 3px;
  }

  .miles-state-sheet__plan-fields label {
    font-size: 0.46rem;
  }

  .miles-state-sheet__plan-fields input {
    min-height: 24px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .miles-state-sheet__plan-fields textarea {
    min-height: 34px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .miles-state-sheet__actions button {
    min-height: 28px;
    font-size: 0.56rem;
  }

  .miles-tip-detail-sheet {
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 0;
    max-height: none;
    padding: 0;
  }

  .miles-tip-detail-sheet__body {
    max-height: none;
  }
}

@media (max-width: 360px) and (orientation: portrait) {
  :root {
    --miles-scene-height: auto;
    --miles-plate-scale: 1;
    --miles-plate-x: 50%;
    --miles-plate-y: 50%;
  }

  .miles-page {
    padding-right: 4px;
    padding-left: 4px;
  }

  .miles-scene {
    min-height: 0;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --miles-scene-height: calc(100dvh - 20px);
    --miles-plate-scale: 1.1;
    --miles-plate-x: 50%;
    --miles-plate-y: 52%;
  }

  .miles-page {
    padding: 8px;
  }

  .miles-travel-bureau {
    min-height: auto;
  }

  .miles-scene-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .miles-scene {
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  .miles-my-plans-workspace,
  .miles-my-plans-workspace.is-open {
    left: 50%;
    top: 12px;
    width: min(440px, calc(100% - 24px));
    min-width: 0;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    transform: translateX(-50%);
  }
  body[data-app-shell] .miles-go-again-workspace {
    left: 50%;
    width: min(440px, calc(100% - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .miles-plane-window {
    display: none;
  }

  .miles-cabinet-hotspot::before,
  .miles-cabinet-hotspot__label,
  .miles-filing-drawer,
  .miles-folder-transfer,
  .miles-plan-transfer,
  .miles-state-sheet,
  .miles-tip-detail-sheet,
  .miles-tip-preview,
  .miles-state-folder {
    transition: none;
    animation: none;
  }

  .miles-filing-drawer,
  .miles-filing-drawer.is-open {
    transform: none;
  }

  .miles-return-ticket,
  .miles-go-again-workspace,
  .miles-plans-basket-hotspot::before,
  .miles-plans-basket-hotspot__label,
  .miles-my-plans-workspace,
  .miles-my-plans-state {
    transition: none;
    animation: none;
  }
}

/* Remove-state entry: transparent hotspot over the existing red globe tab. */
.miles-remove-plan-tab {
  position: absolute; z-index: 49; left: 75%; top: 12.8%; width: 9.5%; height: 7%;
  min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; pointer-events: auto;
}
.miles-remove-plan-tab span {
  position: absolute; bottom: 100%; right: 0; padding: 6px 10px;
  background: #e8d4b4; color: #0a3161; font: bold 0.85rem Georgia, serif;
  white-space: nowrap; opacity: 0; pointer-events: none;
}
.miles-remove-plan-tab::before {
  content: ""; position: absolute; inset: 7% 4% 2%; border-radius: 8px;
  background: radial-gradient(circle at 48% 48%, rgba(232, 184, 91, 0.32), transparent 66%);
  opacity: 0; transition: opacity 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.miles-remove-plan-tab:hover::before, .miles-remove-plan-tab:focus-visible::before {
  opacity: 0.9; box-shadow: 0 0 30px rgba(232, 184, 91, 0.36); transform: translateY(-2px);
}
.miles-remove-plan-tab:hover, .miles-remove-plan-tab:focus-visible {
  filter: drop-shadow(0 0 17px rgba(232, 184, 91, 0.34)) drop-shadow(0 11px 15px rgba(31, 14, 4, 0.22));
}
.miles-remove-plan-tab:hover span, .miles-remove-plan-tab:focus-visible span { opacity: 1; }
.miles-remove-plan-tab:focus-visible { outline: 3px solid #bf0d3e; outline-offset: 3px; }
.miles-remove-plan-tab[hidden], .miles-state-sheet [data-add-to-plans][hidden] { display: none; }
@media (max-width: 700px) {
  /* Below the existing 320px pocket and its 16px paper clearance. */
  .miles-remove-plan-tab { top: calc(100% + 352px); left: 5%; width: 90%; height: auto; min-height: 44px; background: #bf0d3e; }
  .miles-remove-plan-tab span { position: static; display: block; white-space: normal; opacity: 1; background: transparent; color: #fff4df; }
}
