/* Super App V1.13 enhancement layer */

.account-card.v13-account-card {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.account-card.v13-account-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15,68,55,.08);
}
.account-card.v13-account-card:focus-visible {
  outline: 2px solid var(--accent, #0f4437);
  outline-offset: 3px;
}
.account-card .account-tools { display: none !important; }
.account-icon[data-v13-brand="1"],
.v13-account-logo {
  background: #fff;
  border: 1px solid rgba(15,68,55,.10);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.account-icon[data-v13-brand="1"] {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}
.v13-brand-logo {
  width: 68%;
  height: 68%;
  object-fit: contain;
  display: block;
}
.v13-brand-fallback {
  font-weight: 800;
  color: var(--accent, #0f4437);
  letter-spacing: .02em;
}

.v13-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10,32,27,.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.v13-detail-sheet {
  width: min(680px, 100%);
  max-height: min(820px, calc(100dvh - 48px));
  overflow: auto;
  border-radius: 30px;
  background: #fffdf8;
  border: 1px solid rgba(15,68,55,.10);
  box-shadow: 0 32px 80px rgba(10,32,27,.22);
}
.v13-detail-head {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 78px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(255,253,248,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15,68,55,.08);
}
.v13-detail-head > div { display: grid; gap: 2px; }
.v13-detail-head span,
.v13-detail-grid span,
.v13-detail-note > span,
.v13-account-balance span,
.v13-route-list > span {
  color: #7b817b;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}
.v13-detail-head strong { color: #123f34; font-size: 1.05rem; }
.v13-detail-close,
.v13-detail-edit {
  border: 1px solid rgba(15,68,55,.12);
  background: #fffdf8;
  color: #12483b;
  min-height: 42px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.v13-detail-close { width: 42px; font-size: 1.1rem; }
.v13-detail-edit { padding: 0 18px; }
.v13-account-identity {
  padding: 28px 28px 16px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.v13-account-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  flex: 0 0 auto;
}
.v13-account-identity h2 { margin: 0 0 6px; color: #123f34; font-size: 1.8rem; }
.v13-account-identity p,
.v13-account-identity small { margin: 0; color: #757b75; }
.v13-account-balance {
  margin: 8px 28px 22px;
  padding: 24px;
  display: grid;
  gap: 7px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(218,231,221,.72), rgba(246,241,227,.72));
}
.v13-account-balance strong { color: #123f34; font-size: 2rem; }
.v13-detail-grid {
  margin: 0 28px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.v13-detail-grid > div {
  padding: 17px;
  border-radius: 18px;
  background: #f7f4eb;
  display: grid;
  gap: 5px;
}
.v13-detail-grid strong { color: #163f35; }
.v13-detail-note,
.v13-route-list {
  margin: 0 28px 22px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15,68,55,.10);
}
.v13-detail-note p { margin: 8px 0 0; color: #4f5a54; line-height: 1.55; white-space: pre-wrap; }
.v13-detail-archive { margin: 0 28px 28px; width: calc(100% - 56px); }

.v13-field-hint {
  display: block;
  margin-top: 6px;
  color: #7c817d;
  font-size: .78rem;
  line-height: 1.4;
}
.v13-destination-field textarea { min-height: 92px; resize: vertical; }

.v13-trip-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(242,224,171,.92);
  color: #5b491b;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.travel-hero.v13-travel-with-image,
.trip-placeholder.v13-travel-with-image,
.v13-trip-detail-hero.v13-travel-with-image {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.travel-hero.v13-travel-with-image::before,
.trip-placeholder.v13-travel-with-image::before,
.v13-trip-detail-hero.v13-travel-with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--v13-travel-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}
.travel-hero.v13-travel-with-image::after,
.trip-placeholder.v13-travel-with-image::after,
.v13-trip-detail-hero.v13-travel-with-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(6,34,28,.82), rgba(6,34,28,.46) 58%, rgba(6,34,28,.20));
}
.travel-hero.v13-travel-with-image {
  min-height: 270px;
  color: #fff;
  border: none;
}
.travel-hero.v13-travel-with-image h3,
.travel-hero.v13-travel-with-image p,
.travel-hero.v13-travel-with-image small,
.travel-hero.v13-travel-with-image span,
.travel-hero.v13-travel-with-image b { color: #fff; }
.travel-hero.v13-travel-with-image .topic-pill,
.travel-hero.v13-travel-with-image .v13-trip-type-pill { color: #4e4017; }
.trip-placeholder.v13-travel-with-image {
  min-height: 150px;
  padding: 18px;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
}
.trip-placeholder.v13-travel-with-image strong,
.trip-placeholder.v13-travel-with-image span,
.trip-placeholder.v13-travel-with-image small { color: #fff; }
.v13-trip-card-clickable { cursor: pointer; overflow: hidden; }
.v13-trip-card-clickable:hover { box-shadow: 0 14px 34px rgba(15,68,55,.09); }
.v13-trip-image {
  position: relative;
  height: 168px;
  margin: -24px -24px 22px;
  overflow: hidden;
  background: linear-gradient(135deg,#dbe6dc,#eee7d6);
  isolation: isolate;
}
.v13-trip-image.v13-travel-with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--v13-travel-image);
  background-position: center;
  background-size: cover;
  transition: transform .5s ease;
}
.v13-trip-card-clickable:hover .v13-trip-image::before { transform: scale(1.025); }
.v13-trip-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 45%, rgba(4,30,24,.52));
}
.v13-photo-credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  max-width: 70%;
  color: rgba(255,255,255,.88);
  font-size: .66rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v13-travel-fallback {
  background-image: linear-gradient(135deg, rgba(20,80,64,.92), rgba(150,137,84,.72));
}

.v13-trip-detail { overflow: hidden; }
.v13-trip-detail-hero {
  min-height: 310px;
  background: linear-gradient(135deg,#1c594a,#82764e);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.v13-trip-detail-overlay {
  width: 100%;
  padding: 28px;
  color: #fff;
  display: grid;
  gap: 8px;
}
.v13-trip-detail-overlay .v13-trip-close {
  position: absolute;
  top: 22px;
  left: 22px;
  background: rgba(255,255,255,.88);
}
.v13-trip-detail-overlay h2 { margin: 8px 0 0; color: #fff; font-size: 2rem; }
.v13-trip-detail-overlay p,
.v13-trip-detail-overlay small { margin: 0; color: rgba(255,255,255,.92); }
.v13-trip-detail-body { padding: 24px 0 28px; }
.v13-route-list { display: grid; gap: 12px; }
.v13-route-list > div { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; }
.v13-route-list > div b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e0eade;
  color: #164538;
  font-size: .72rem;
}
.v13-route-list > div strong { color: #174238; }
.v13-trip-detail-actions {
  margin: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.v13-trip-photo-note { display: block; margin: 16px 28px 0; color: #858984; }
.v13-trip-photo-note a { color: #285f50; }

@media (max-width: 720px) {
  .v13-detail-backdrop { padding: 0; place-items: end stretch; }
  .v13-detail-sheet {
    width: 100%;
    max-height: 94dvh;
    border-radius: 30px 30px 0 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .v13-account-identity { padding: 24px 22px 14px; }
  .v13-account-balance { margin: 6px 22px 18px; }
  .v13-detail-grid { margin: 0 22px 18px; gap: 9px; }
  .v13-detail-grid > div { padding: 15px 13px; }
  .v13-detail-note,
  .v13-route-list { margin: 0 22px 18px; }
  .v13-detail-archive { margin: 0 22px 24px; width: calc(100% - 44px); }
  .v13-trip-detail-actions { margin: 0 22px; }
  .v13-trip-photo-note { margin: 14px 22px 0; }
  .v13-trip-detail-hero { min-height: 280px; }
  .v13-trip-detail-overlay { padding: 24px 22px; }
  .travel-hero.v13-travel-with-image { min-height: 300px; }
  .v13-trip-image { height: 148px; margin-left: -20px; margin-right: -20px; margin-top: -20px; }
}
