/* Shared shell and tabbar. Page-specific styles must not redefine these rules. */
@font-face {
  font-family: "DH Sans";
  src: url("../dashi-home/assets/fonts/NotoSansSC.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.dh-site-body { margin: 0; background: #290203; }

.dh-site {
  --dh-nav-height: calc(72px + env(safe-area-inset-bottom, 0px));
  --dh-nav-overhang: 19px;
  --dh-nav-clearance: calc(var(--dh-nav-height) + var(--dh-nav-overhang) + 8px);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--dh-page-width, 480px);
  min-height: 100svh;
  margin-inline: auto;
  padding-bottom: var(--dh-nav-clearance);
  background: var(--dh-shell-background, #a00005);
}

.dh-site :is(a,button,input,select,textarea,[tabindex]) {
  scroll-margin-bottom: var(--dh-nav-clearance);
}

.dh-bottom-nav,
.dh-bottom-nav * { box-sizing: border-box; }

.dh-bottom-nav {
  --dh-nav-ink: #fff2db;
  --dh-nav-accent: #ffdb96;
  --dh-nav-bezel: 56px;
  --dh-nav-icon-row: 32px;
  --dh-nav-shimmer-cycle: 7s;
  position: fixed;
  z-index: 10;
  inset: auto 0 0;
  width: 100%;
  max-width: var(--dh-page-width, 480px);
  margin-inline: auto;
  padding: 6px max(8px, env(safe-area-inset-right, 0px))
    calc(6px + env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  border-block-start: 1px solid transparent;
  background:
    linear-gradient(180deg, #80151bec, #690e17f7 52%, #4d0912) padding-box,
    linear-gradient(90deg, #d89b631d, #f0be818c 46%, #f0be818c 54%, #d89b631d) border-box;
  box-shadow: 0 -3px 10px #3c060b25;
  font-family: "DH Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.dh-bottom-nav .dh-nav-shimmer {
  position: absolute;
  inset: -6px 0 auto;
  height: 11px;
  overflow: hidden;
  pointer-events: none;
}

.dh-bottom-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dh-bottom-nav li {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
}

.dh-bottom-nav .dh-nav-wide { flex-grow: 1.15; }
.dh-bottom-nav .dh-nav-priority { flex-grow: 1.64; }

.dh-bottom-nav .dh-nav-item {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 0 0 7px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--dh-nav-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.dh-bottom-nav .dh-nav-label { max-width: 100%; }

.dh-bottom-nav .dh-nav-icon {
  display: grid;
  place-items: center;
  width: 36px;
  max-width: 100%;
  height: var(--dh-nav-icon-row);
  flex: none;
  border-radius: 8px;
}

.dh-bottom-nav .dh-nav-icon img { display: block; width: 27px; height: 27px; object-fit: contain; }

/* The original lion rises above the rule while sharing the text baseline. */
.dh-bottom-nav .dh-nav-emblem {
  position: relative;
  width: var(--dh-nav-bezel);
  height: var(--dh-nav-bezel);
  margin-block-start: calc(var(--dh-nav-icon-row) - var(--dh-nav-bezel));
  border: 1px solid #ffd68b;
  border-radius: 50%;
  background: radial-gradient(circle at 44% 27%, #ef891d, #c2310d 59%, #960c05 89%);
  box-shadow: inset 0 0 0 2px #ffe0a423, 0 0 9px #ffb4524d, 0 3px 7px #46040365;
}

.dh-bottom-nav .dh-nav-emblem img { width: 43px; height: 43px; }
.dh-bottom-nav .dh-nav-item[aria-current="page"] { color: var(--dh-nav-accent); font-weight: 650; }
.dh-bottom-nav [aria-current="page"]:not(:disabled)::after {
  position: absolute;
  inset: auto auto 1px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}
.dh-bottom-nav [aria-current="page"] .dh-nav-icon:not(.dh-nav-emblem) img { filter: drop-shadow(0 0 4px #ffca6d65); }

.dh-bottom-nav .dh-nav-item:disabled { opacity: .56; cursor: not-allowed; -webkit-text-fill-color: currentColor; }
.dh-bottom-nav a { cursor: pointer; }
.dh-bottom-nav a:focus-visible { outline: 2px solid var(--dh-nav-accent); outline-offset: -2px; }
.dh-bottom-nav a:active { background: #ffdfb225; }

@media (hover: hover) {
  .dh-bottom-nav a:hover { background: #ffdfb215; }
}

@media (prefers-reduced-motion: no-preference) {
  .dh-bottom-nav a { transition: background-color .16s ease; }

  .dh-bottom-nav .dh-nav-shimmer::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background:
      radial-gradient(ellipse at center, #fff1b3a6, #ffc4694f 27%, transparent 70%),
      linear-gradient(90deg, transparent, #ffca6c8c 28%, #fff7d1 51%, #ffcf7c9c 68%, transparent) center / 100% 2px no-repeat;
    pointer-events: none;
    content: "";
    animation: dh-nav-gold-sweep var(--dh-nav-shimmer-cycle) linear infinite;
  }

  .dh-bottom-nav .dh-nav-emblem::after {
    position: absolute;
    inset: -1px;
    border: 1px solid #fff0bd;
    border-radius: inherit;
    box-shadow: 0 0 12px #ffc964b8, inset 0 0 6px #ffdb7d6b;
    pointer-events: none;
    content: "";
    animation: dh-nav-gold-ring var(--dh-nav-shimmer-cycle) ease-in-out infinite;
  }
}

@keyframes dh-nav-gold-sweep {
  0%, 4% { transform: translateX(-100%); opacity: 0; }
  22% { opacity: 1; }
  40%, 100% { transform: translateX(250%); opacity: 0; }
}

@keyframes dh-nav-gold-ring {
  0%, 15%, 32%, 100% { opacity: 0; }
  22% { opacity: .95; }
}


