/* ARCANA V16 — additive motion, journal favorites and interaction-fidelity layer. */
:root{
  --v16-gold:#efd786;
  --v16-violet:#b996ef;
  --v16-ease:cubic-bezier(.2,.8,.2,1);
}
body{min-inline-size:0!important;inline-size:100%}
.hero-copy h1{padding-block:4px!important}
html[lang="ja"] .hero-copy h1,html[lang="ko"] .hero-copy h1{line-height:1.18!important}
.v9-service-gateway .v9-tier-card h3{padding-block:3px!important}
html[lang="fr"] .v9-service-gateway .v9-tier-card h3,
html[lang="de"] .v9-service-gateway .v9-tier-card h3{min-height:60px!important}

/* The existing header keeps its structure; this only adds a calm compact state. */
.topbar{
  transition:background-color .45s var(--v16-ease),border-color .45s var(--v16-ease),
    box-shadow .45s var(--v16-ease),backdrop-filter .45s var(--v16-ease)!important;
}
body.v16-scrolled .topbar{
  background:linear-gradient(90deg,rgba(8,4,14,.94),rgba(20,10,31,.9),rgba(8,4,14,.94))!important;
  border-color:rgba(230,194,98,.24)!important;
  box-shadow:0 15px 45px rgba(0,0,0,.32),0 1px 0 rgba(238,211,133,.08) inset!important;
  backdrop-filter:blur(22px) saturate(1.16)!important;
}

/* Route and scroll entrances never hide content unless the enhancement script is active. */
body.v16-motion .view.active.v16-route-enter{
  animation:v16-route-enter .72s var(--v16-ease) both;
}
body.v16-motion .v16-reveal{
  opacity:0;
  transform:translate3d(0,22px,0) scale(.992);
  filter:saturate(.88);
  transition:opacity .8s var(--v16-ease),transform .8s var(--v16-ease),filter .8s var(--v16-ease);
}
body.v16-motion .v16-reveal.v16-visible{
  opacity:1;
  transform:none;
  filter:none;
}
@keyframes v16-route-enter{
  0%{opacity:.3;transform:translate3d(0,13px,0);filter:blur(3px)}
  100%{opacity:1;transform:none;filter:none}
}

/* Fine-pointer cards receive a restrained light response without changing geometry. */
.v16-light-card{
  --v16-light-x:50%;--v16-light-y:50%;
  transition:border-color .35s var(--v16-ease),box-shadow .35s var(--v16-ease),
    filter .35s var(--v16-ease),transform .35s var(--v16-ease)!important;
}
@media (hover:hover) and (pointer:fine){
  .v16-light-card:hover{
    border-color:rgba(239,215,134,.42)!important;
    box-shadow:0 24px 68px rgba(0,0,0,.34),
      var(--v16-shadow-x,0) var(--v16-shadow-y,0) 34px rgba(185,150,239,.11),
      0 0 0 1px rgba(239,215,134,.06) inset!important;
    filter:saturate(1.06) brightness(1.035);
    transform:translate3d(0,-3px,0);
  }
}

/* Every existing button remains intact; the ripple is an ephemeral child node. */
.v16-ripple-host{position:relative;overflow:hidden!important;isolation:isolate}
.v16-ripple{
  position:absolute!important;z-index:0!important;inline-size:14px!important;block-size:14px!important;
  margin:-7px 0 0 -7px!important;border-radius:50%!important;pointer-events:none!important;
  background:radial-gradient(circle,rgba(255,239,175,.42),rgba(184,138,241,.18) 46%,transparent 70%)!important;
  transform:scale(0);animation:v16-ripple .72s ease-out forwards!important;
}
@keyframes v16-ripple{to{transform:scale(18);opacity:0}}

/* Favorites are an additive journal control and do not replace existing archive copy. */
.v16-history-tools{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.v16-history-search{
  flex:1 1 260px!important;inline-size:min(100%,420px)!important;min-block-size:44px!important;
  padding-inline:15px!important;border-color:rgba(229,197,108,.24)!important;
  background:linear-gradient(120deg,rgba(12,7,19,.84),rgba(31,17,43,.7))!important;
}
.v16-history-search:focus{border-color:rgba(239,215,134,.58)!important;box-shadow:0 0 0 4px rgba(239,215,134,.08)!important}
.v16-favorites-filter{
  min-height:44px!important;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
  white-space:normal!important;text-wrap:balance;
}
.v16-favorites-filter[aria-pressed="true"]{
  color:#17100a!important;background:linear-gradient(135deg,#f4df91,#bd8fdc)!important;
  border-color:transparent!important;box-shadow:0 10px 32px rgba(206,164,100,.2)!important;
}
.v16-favorite-count{
  min-inline-size:24px;min-block-size:24px;display:inline-grid;place-items:center;padding:0 7px;
  border:1px solid currentColor;border-radius:999px;font:700 11px/1 system-ui,sans-serif;
}
.archive-card{position:relative}
.v16-favorite-button{
  position:absolute!important;inset:13px 13px auto auto!important;z-index:6!important;
  inline-size:44px!important;block-size:44px!important;min-inline-size:44px!important;
  display:grid!important;place-items:center!important;margin:0!important;padding:0!important;
  border:1px solid rgba(229,197,108,.3)!important;border-radius:50%!important;
  color:#cabdce!important;background:rgba(9,5,15,.76)!important;backdrop-filter:blur(12px)!important;
  font:22px/1 Georgia,serif!important;cursor:pointer!important;
  transition:transform .28s var(--v16-ease),color .28s ease,background .28s ease,box-shadow .28s ease!important;
}
.v16-share-button{
  position:absolute!important;inset:13px 65px auto auto!important;z-index:6!important;
  inline-size:44px!important;block-size:44px!important;min-inline-size:44px!important;
  display:grid!important;place-items:center!important;margin:0!important;padding:0!important;
  border:1px solid rgba(185,150,239,.3)!important;border-radius:50%!important;
  color:#cfc0df!important;background:rgba(9,5,15,.76)!important;backdrop-filter:blur(12px)!important;
  font:20px/1 system-ui,sans-serif!important;cursor:pointer!important;
  transition:transform .28s var(--v16-ease),color .28s ease,background .28s ease,box-shadow .28s ease!important;
}
.v16-share-button:hover,.v16-share-button:focus-visible{transform:translateY(-2px) rotate(-5deg);color:var(--v16-gold)!important;box-shadow:0 10px 28px rgba(185,150,239,.16)!important}
.v16-favorite-button:hover,.v16-favorite-button:focus-visible{transform:scale(1.08);color:var(--v16-gold)!important}
.v16-favorite-button[aria-pressed="true"]{
  color:#1a1006!important;background:linear-gradient(145deg,#f4df91,#cda44f)!important;
  box-shadow:0 0 0 3px rgba(239,215,134,.08),0 10px 30px rgba(218,172,76,.2)!important;
}
.archive-card.v16-favorite{border-color:rgba(239,215,134,.42)!important}
.archive-card.v16-favorite:before{
  content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;
  background:linear-gradient(120deg,transparent 18%,rgba(243,219,145,.09) 48%,transparent 78%);
  background-size:220% 100%;animation:v16-favorite-sheen 5.8s ease-in-out infinite;
}
@keyframes v16-favorite-sheen{0%,52%{background-position:130% 0}100%{background-position:-110% 0}}
.archive-card.v16-filtered{display:none!important}
.v16-filter-empty{
  grid-column:1/-1;min-height:210px;display:grid;place-items:center;padding:28px;text-align:center;
  border:1px dashed rgba(230,198,108,.3);border-radius:18px;color:var(--muted);
  background:radial-gradient(circle at 50% 10%,rgba(154,121,208,.12),transparent 58%);
}
.archive-card .archive-top{padding-inline-end:108px}

/* Account security gains an additive all-other-sessions control. */
.v16-session-shield{
  display:flex;align-items:center;justify-content:space-between;gap:18px;margin:14px 0 18px;padding:16px 18px;
  border:1px solid rgba(218,181,94,.24);border-radius:16px;
  background:linear-gradient(120deg,rgba(216,180,91,.08),rgba(147,104,207,.08));
  box-shadow:0 15px 38px rgba(0,0,0,.12) inset;
}
.v16-session-shield strong{display:block;color:var(--v16-gold);font-size:15px;letter-spacing:.03em}
.v16-session-shield p{max-width:660px;margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.7}
.v16-session-shield .v16-revoke-others{flex:0 0 auto;min-height:44px;max-width:100%;white-space:normal}

.order-list article.v16-order-pending{grid-template-columns:minmax(120px,1fr) auto auto auto;align-items:center}
.v16-order-refresh{min-height:40px!important;padding:7px 12px!important;white-space:normal!important}
.v16-order-refresh.v16-saving{cursor:wait!important;background:linear-gradient(100deg,rgba(255,255,255,.02),rgba(239,215,134,.14),rgba(255,255,255,.02))!important;background-size:220% 100%!important;animation:v16-order-check 1s linear infinite!important}
@keyframes v16-order-check{to{background-position:-220% 0}}

/* Small state cues make saving feel immediate without changing the original wording. */
.v16-favorite-button.v16-saving,.v16-share-button.v16-saving{cursor:wait!important;animation:v16-save-pulse .75s ease-in-out infinite alternate}
@keyframes v16-save-pulse{to{opacity:.55;transform:scale(.94)}}
body.v16-offline .topbar:after{
  content:"";position:absolute;inset:auto 0 -1px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#b996ef,transparent);animation:v16-offline 2s linear infinite;
}
@keyframes v16-offline{from{background-position:-100vw 0}to{background-position:100vw 0}}

@media (max-width:760px){
  .history-hero{gap:18px!important}
  .history-toolbar,.v16-history-tools{inline-size:100%}
  .history-toolbar>button,.v16-history-tools>button{flex:1 1 145px}
  .v16-history-search{flex-basis:100%!important;inline-size:100%!important;max-inline-size:none!important}
  .archive-card{padding-top:66px!important}
  .v16-favorite-button{inset:11px 11px auto auto!important}
  .v16-share-button{inset:11px 63px auto auto!important}
  html[lang="de"] .history-toolbar>button{flex-basis:100%!important;inline-size:100%!important}
  .v16-session-shield{align-items:stretch;flex-direction:column}
  .v16-session-shield .v16-revoke-others{inline-size:100%}
  .order-list article.v16-order-pending{grid-template-columns:minmax(0,1fr) auto auto}
  .order-list article.v16-order-pending .v16-order-refresh{grid-column:1/-1;inline-size:100%}
}

@media (prefers-reduced-motion:reduce){
  body.v16-motion .view.active.v16-route-enter{animation:none!important}
  body.v16-motion .v16-reveal{opacity:1!important;transform:none!important;filter:none!important;transition:none!important}
  .v16-light-card,.v16-light-card:hover{transform:none!important;transition:none!important}
  .v16-ripple{display:none!important}
  .archive-card.v16-favorite:before,.v16-favorite-button.v16-saving,.v16-share-button.v16-saving,.v16-order-refresh.v16-saving,body.v16-offline .topbar:after{animation:none!important}
}

@media (forced-colors:active){
  .v16-favorite-button,.v16-share-button,.v16-favorites-filter{forced-color-adjust:auto}
  .archive-card.v16-favorite{outline:2px solid Highlight}
}
