:root {
  --red: #dc302f;
  --red-deep: #b91f23;
  --ink: #202124;
  --muted: #6b6f76;
  --paper: #ffffff;
  --mist: #f1f3f6;
  --line: #e5e7eb;
  --container-gutter: 0.75rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-inline: var(--container-gutter);
  height: 88px;
  margin: auto;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-logo {
  display: block;
  width: clamp(128px, 10vw, 158px);
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-mark::before {
  content: "米宅";
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.header-note {
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  opacity: 0.7;
}

.farewell {
  position: relative;
  display: grid;
  min-height: 92vh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(17, 19, 22, 0.99) 0%, rgba(31, 32, 35, 0.97) 55%, rgba(51, 29, 27, 0.96) 100%),
    radial-gradient(circle at 74% 30%, rgba(220, 48, 47, 0.3), transparent 38%);
}

.farewell::before,
.farewell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.farewell::before {
  width: 52vw;
  height: 52vw;
  right: -23vw;
  top: -20vw;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.018),
    0 0 0 140px rgba(255, 255, 255, 0.012);
}

.farewell::after {
  inset: 0;
  opacity: 0.13;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 7px;
  mix-blend-mode: overlay;
}

.farewell-glow {
  position: absolute;
  right: 8vw;
  top: 26%;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 48, 47, 0.42), rgba(220, 48, 47, 0) 68%);
  filter: blur(10px);
}

.farewell-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding-inline: var(--container-gutter);
  margin: auto;
  padding: 9rem 0 6rem;
}

.brand-mark--hero {
  width: 76px;
  height: 76px;
  margin-bottom: 2.25rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 14px 35px rgba(220, 48, 47, 0.24);
}

.brand-mark--hero::before {
  font-size: 1.35rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.farewell h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(3.6rem, 8.3vw, 7.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 600px;
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.9;
}

.farewell-rule {
  display: flex;
  align-items: center;
  width: 260px;
  height: 1px;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.18);
}

.farewell-rule span {
  width: 72px;
  height: 2px;
  background: var(--red);
}

.farewell-copy {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.95rem;
  line-height: 1.9;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  margin-top: 3.25rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  transition: color 180ms ease;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: #fff;
}

.scroll-line {
  position: relative;
  width: 72px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateX(-100%);
  animation: travel 2.4s ease-in-out infinite;
}

@keyframes travel {
  0%, 20% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

.section {
  padding: 7.5rem 0;
}

.destinations {
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 0 3rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.section-heading .section-kicker {
  grid-column: 1 / -1;
}

.section-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.destination-card {
  position: relative;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.8rem;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #fff;
  transition: color 240ms ease, background 240ms ease, transform 240ms ease;
}

.destination-card:last-child {
  border-right: 0;
}

.destination-card::before {
  content: "";
  position: absolute;
  inset: auto -15% -55% auto;
  width: 80%;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: transform 400ms ease, border-color 240ms ease;
}

.destination-card:hover,
.destination-card:focus-visible {
  z-index: 1;
  color: #fff;
  background: var(--red);
  outline: none;
  transform: translateY(-8px);
}

.destination-card:hover::before,
.destination-card:focus-visible::before {
  border-color: rgba(255, 255, 255, 0.24);
  transform: scale(1.3);
}

.card-index {
  color: #9da1a8;
  font: 600 0.72rem/1 Arial, sans-serif;
  letter-spacing: 0.14em;
}

.destination-card:hover .card-index,
.destination-card:focus-visible .card-index {
  color: rgba(255, 255, 255, 0.7);
}

.card-symbol {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  max-width: 85%;
  height: 68px;
  margin: 2rem 0;
  padding: 0.65rem 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.destination-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.card-symbol--minuo {
  background: #202124;
}

.destination-card:hover .card-symbol,
.destination-card:focus-visible .card-symbol {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.card-body strong {
  font-size: 1.5rem;
}

.card-body span {
  color: #9da1a8;
  font: 600 0.7rem/1 Arial, sans-serif;
  letter-spacing: 0.2em;
}

.destination-card:hover .card-body span,
.destination-card:focus-visible .card-body span {
  color: rgba(255, 255, 255, 0.68);
}

.card-action {
  position: absolute;
  right: 1.8rem;
  bottom: 1.8rem;
  z-index: 1;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.82rem;
}

.accounts {
  color: #fff;
  background: #202124;
}

.section-heading--light > p:last-child {
  color: rgba(255, 255, 255, 0.52);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, 120px);
  justify-content: end;
  gap: 50px;
  padding: 0;
}

.account {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.25rem;
  color: #fff;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.account:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
  border-radius: 0.5rem;
}

.account-logo {
  display: block;
  width: clamp(64px, 6.2vw, 80px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.account:hover .account-logo,
.account:focus-visible .account-logo,
.account.is-open .account-logo {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

.account-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-name {
  font-size: 0.95rem;
  white-space: nowrap;
}

.qr-popover {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 0.8rem);
  display: grid;
  width: 176px;
  justify-items: center;
  padding: 1rem;
  color: var(--ink);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px) scale(0.98);
  transform-origin: 50% 100%;
  transition: opacity 170ms ease, transform 170ms ease;
}

.qr-popover::after {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
}

.account:hover .qr-popover,
.account:focus-visible .qr-popover,
.account.is-open .qr-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.qr-image {
  display: block;
  width: 120px;
  height: 120px;
  margin-bottom: 0.7rem;
  object-fit: cover;
  background: #fff;
}

.qr-popover strong {
  font-size: 0.9rem;
}

.qr-popover small {
  margin-top: 0.25rem;
  color: #8b8f95;
  font-size: 0.75rem;
}

.site-footer {
  padding: 2.25rem 0;
  color: #777b82;
  background: #fff;
  font-size: 0.82rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 50%;
  background: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
}

.site-footer p {
  margin: 0;
  color: #34363a;
}


/* Bootstrap-style responsive content container. */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--container-gutter);
  padding-left: var(--container-gutter);
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
}

@media (min-width: 992px) {
  .container { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* Desktop farewell experience: three horizontal bands in one viewport. */
@media (min-width: 1080px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .site-header {
    height: 68px;
  }

  main {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50% 25% 25%;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }

  .farewell,
  .destinations,
  .accounts {
    grid-column: 1;
    min-width: 0;
  }

  .farewell {
    grid-row: 1;
    min-height: 0;
    height: auto;
  }

  .farewell::before {
    width: 44vw;
    height: 44vw;
    right: -12vw;
    top: -30vw;
  }

  .farewell-glow {
    right: 8vw;
    top: -12%;
    width: 23rem;
    height: 23rem;
  }

  .farewell-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 5rem 0 1.5rem;
  }

  .brand-mark--hero,
  .scroll-cue {
    display: none;
  }

  .eyebrow {
    margin: 0 0 0.65rem;
  }

  .lead {
    width: 100%;
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-family: "Songti SC", "STSong", serif;
    font-size: clamp(1.35rem, 1.8vw, 1.9rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.02em;
    white-space: normal;
    text-wrap: balance;
  }

  .farewell h1 {
    max-width: none;
    margin: 0.75rem 0 0;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: clamp(1.15rem, 1.4vw, 1.45rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .farewell-rule {
    width: min(100%, 360px);
    margin: 1.15rem 0 0.9rem;
  }

  .farewell-copy {
    max-width: 780px;
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .destinations,
  .accounts {
    display: flex;
    align-items: center;
    padding: 0;
  }

  .section-container {
    display: grid;
    grid-template-columns: minmax(260px, 28%) minmax(0, 72%);
    align-items: center;
    gap: clamp(2rem, 4vw, 4rem);
  }

  .destinations {
    grid-row: 2;
  }

  .accounts {
    grid-row: 3;
  }

  .section-heading {
    display: block;
    margin: 0;
  }

  .section-heading .section-kicker {
    margin-bottom: 0.45rem;
  }

  .section-heading h2 {
    font-size: clamp(1.85rem, 2.6vw, 2.8rem);
  }

  .section-heading > p:last-child {
    margin-top: 0.7rem;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .destination-grid {
    width: 100%;
  }

  .destination-card {
    min-height: 0;
    height: clamp(130px, 16vh, 165px);
    padding: clamp(0.9rem, 1.3vw, 1.25rem);
  }

  .card-symbol {
    width: clamp(105px, 9vw, 150px);
    max-width: 85%;
    height: clamp(48px, 5.3vh, 64px);
    margin: clamp(0.5rem, 1vh, 0.8rem) 0;
    padding: 0.55rem 0.75rem;
  }

  .card-body {
    gap: 0.3rem;
  }

  .card-body strong {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
  }

  .card-action {
    right: 0.9rem;
    bottom: 0.85rem;
    font-size: 0.72rem;
  }

  .account-grid {
    width: auto;
    justify-self: end;
    gap: 50px;
    padding: 0;
  }

  .account {
    gap: 0.55rem;
    padding: 0.35rem 0;
  }

  .account-logo {
    width: clamp(50px, 3.9vw, 66px);
  }


  .account-name {
    font-size: clamp(0.72rem, 0.8vw, 0.84rem);
  }

  .site-footer {
    display: none;
  }
}

@media (max-width: 960px) {
  .destination-grid {
    grid-template-columns: 1fr;
  }

  .destination-card {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .destination-card:last-child {
    border-bottom: 0;
  }

  .card-symbol {
    margin: 2rem 0;
  }

  .account-grid {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    justify-self: stretch;
    gap: 1rem;
    padding: 1rem 0;
  }
}

@media (max-width: 700px) {


  .header-note {
    display: none;
  }

  .farewell {
    min-height: 100svh;
  }

  .farewell-inner {
    padding-top: 8.5rem;
  }

  .brand-mark--hero {
    width: 64px;
    height: 64px;
    margin-bottom: 1.8rem;
  }

  .farewell h1 {
    font-size: clamp(3.25rem, 17vw, 5.2rem);
  }

  .section {
    padding-top: 5.2rem;
    padding-bottom: 5.2rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .section-heading .section-kicker {
    grid-column: auto;
    margin-bottom: -0.25rem;
  }

  .destination-card {
    min-height: 235px;
    padding: 1.4rem;
  }

  .account-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem 0.75rem;
  }


  .account-name {
    font-size: 0.9rem;
  }

  .qr-popover {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    width: min(260px, calc(100vw - 3rem));
    transform: translate(-50%, 14px);
  }

  .qr-popover::after {
    display: none;
  }

  .account:hover .qr-popover:not(:hover) {
    opacity: 0;
    pointer-events: none;
  }

  .account.is-open .qr-popover,
  .account:focus-visible .qr-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .footer-inner {
    grid-template-columns: auto 1fr;
  }

  .footer-inner > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
