/*
 * Agonie Home — front-page styles (ported from Vue SCSS, no build).
 * Mirrors src/style/*.scss + component scoped styles.
 */

@font-face {
  font-family: "Pacifico-Regular";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Pacifico-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "UnidreamLED";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/UnidreamLED.woff2") format("woff2");
  unicode-range: U+0020, U+0030-003A;
}

#index.candy-home {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--candy-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 抵消主题 `* { font-family }`，让门户字体栈能继承到子元素 */
#index.candy-home * {
  font-family: inherit;
}

#index.candy-home .mdi,
#index.candy-home .mdi::before {
  font-family: "Material Design Icons";
}

/* Mirror Vue #app — only fill the screen when portal is the active .move-show */
#index.candy-home.move-show {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  overscroll-behavior: none;
}

#index.candy-home .candy-home-app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Hide WP chrome on homepage for Vue parity */
#index.candy-home #wpadminbar {
  display: none !important;
}

#index.candy-home html {
  margin-top: 0 !important;
}

/* Match Vue `*, a, p { padding:0 }` — :where() keeps 0 specificity so component padding wins */
:where(#index.candy-home) *,
:where(#index.candy-home) a,
:where(#index.candy-home) p {
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}

:where(#index.candy-home) *:hover,
:where(#index.candy-home) a:hover,
:where(#index.candy-home) p:hover {
  transition: 0.3s;
}

#index.candy-home a:hover {
  color: rgb(57, 159, 255);
  text-decoration: none;
}

/* Beat global w.css `strong/b { color:#222 }` inside portal glass panels */
#index.candy-home b,
#index.candy-home strong {
  color: #fff;
}

/* Card / site-link anchors must not pick up global link hover */
#index.candy-home .cards:hover,
#index.candy-home a.cards:hover,
#index.candy-home .link-all .item:hover,
#index.candy-home .social .link a:hover {
  color: #fff;
  text-decoration: none;
}

#index.candy-home .cards {
  border-radius: 6px;
  background-color: #00000040;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* 勿在静息态写 transform，否则会合成层导致中文发虚/锯齿 */
  transition: backdrop-filter 0.3s, transform 0.3s;
}

#index.candy-home .cards:hover {
  transform: scale(1.01);
}

#index.candy-home .cards:active {
  transform: scale(0.98);
}

/* Site link cards: Vue uses .item.cards hover scale 1.02 (overrides .cards 1.01) */
#index.candy-home .link-all .item.cards:hover {
  transform: scale(1.02);
  background: rgb(0 0 0 / 40%);
  transition: 0.3s;
}

#index.candy-home .link-all .item.cards:active {
  transform: scale(1);
}

#index.candy-home .text-hidden {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-blur-in {
  from {
    filter: blur(20px) brightness(0.3);
    transform: scale(1.6);
  }
  to {
    filter: blur(0) brightness(1);
    transform: scale(1);
  }
}

@keyframes fade-blur-main-in {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* Loader — portal curtain (base spinner in w.css `.candy-loader`) */
#index.candy-home #loader-wrapper.candy-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

#index.candy-home #loader-wrapper.loaded {
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.45s 0.1s;
}

#index.candy-home #loader-wrapper.loaded .loader-circle,
#index.candy-home #loader-wrapper.loaded .loader-text {
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

#index.candy-home #loader-wrapper.loaded .loader-section.section-left {
  transform: translateX(-100%);
  transition: transform 0.35s 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#index.candy-home #loader-wrapper.loaded .loader-section.section-right {
  transform: translateX(100%);
  transition: transform 0.35s 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#index.candy-home #loader-wrapper.loaded.is-gone {
  display: none !important;
}

/* Wallpaper — fixed under move layer (sibling of #home-move-layer) */
#index.candy-home > .cover,
#index.candy-home .cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: 0.25s;
  z-index: 0;
}

#index.candy-home .cover.show { z-index: 2; }

#index.candy-home .cover .bg,
#index.candy-home .cover .cover-photo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: var(--candy-wallpaper);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  object-fit: cover;
  backface-visibility: hidden;
  filter: blur(20px) brightness(0.3);
  transition: filter 0.3s, transform 0.3s;
  animation: fade-blur-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.45s;
}

/* 首次入场后锁定壁纸，避免从其他屏返回时重复模糊放大 */
#index.candy-home.is-settled .cover .bg,
#index.candy-home.is-settled .cover .cover-photo {
  animation: none !important;
  filter: none;
  transform: none;
}

/* 阅读模式：门户封面与全站 #site-bg 同亮度，离开门户不跳暗/跳亮 */
body.reading-mode #index.candy-home .cover .bg,
body.reading-mode #index.candy-home .cover .cover-photo,
html.reading-mode #index.candy-home .cover .bg,
html.reading-mode #index.candy-home .cover .cover-photo,
body.reading-mode #index.candy-home.is-settled .cover .bg,
body.reading-mode #index.candy-home.is-settled .cover .cover-photo,
html.reading-mode #index.candy-home.is-settled .cover .bg,
html.reading-mode #index.candy-home.is-settled .cover .cover-photo {
  filter: blur(0) brightness(0.42) !important;
}

#index.candy-home.is-settled .message .logo,
#index.candy-home.is-settled .message .description,
#index.candy-home.is-settled .social,
#index.candy-home.is-settled .hitokoto,
#index.candy-home.is-settled .time-weather,
#index.candy-home.is-settled .links,
#index.candy-home.is-settled .mobile-logo,
#index.candy-home.is-settled #candy-home-main {
  animation: none !important;
}

#index.candy-home.is-settled #candy-home-main {
  animation: none !important;
  transform: none;
  opacity: 1;
}

#index.candy-home .cover .gray {
  opacity: 1;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: var(
    --candy-wallpaper-vignette,
    radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(rgba(0, 0, 0, 0) 33%, rgba(0, 0, 0, 0.3) 166%)
  );
  transition: opacity 0.45s ease;
  pointer-events: none;
}

#index.candy-home .cover .gray.hidden {
  opacity: 0;
}

#index.candy-home .cover .down {
  font-size: 16px;
  color: white;
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  margin: 0 auto;
  padding: 20px 26px;
  border-radius: 8px;
  background-color: #00000030;
  width: 120px;
  height: 30px;
  display: none;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 2;
}

#index.candy-home .cover.show .down:not([hidden]) {
  display: flex;
}

#index.candy-home .cover .down:hover {
  transform: scale(1.05);
  background-color: #00000060;
  color: #fff;
  text-decoration: none;
}

#index.candy-home .cover .down:active {
  transform: scale(1);
}

/* Main — App.vue */
#index.candy-home #candy-home-main {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  opacity: 0;
  transform: none;
  transform-origin: center center;
  transition: none;
}

#index.candy-home #candy-home-main[hidden] {
  display: none !important;
}

#index.candy-home #candy-home-main.is-ready {
  opacity: 1;
  transform: none;
  animation: fade-blur-main-in 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#index.candy-home #candy-home-main.bg-focus .container,
#index.candy-home #candy-home-main.bg-focus #mobile-menu,
#index.candy-home #candy-home-main.bg-focus .f-ter {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

/*
 * Critical hides for SSR shells that live in home-views.css visually.
 */

.link-popup-backdrop[hidden],
#index.candy-home #home-box[hidden],
.time-weather .open-capsule[hidden],
#link-popup-page[hidden] {
  display: none !important;
}

/* global.scss container max-width + App.vue .container */
#index.candy-home #candy-home-main .container {
  width: 100%;
  max-width: 1200px;
  height: 100vh;
  margin: 0 auto;
  padding: 0 0.5vw;
}

/* Use #home-all — do NOT use #candy-home-main .all (matches .search-input .all in Start popup). */
#index.candy-home #home-all {
  width: 100%;
  height: 100%;
  padding: 0 0.75rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

@media (max-width: 1280px) {
  #candy-home-main .container { max-width: 1100px; }
}

@media (max-width: 1200px) {
  #candy-home-main .container { padding: 0 2vw; }
}

@media (max-width: 992px) {
  #candy-home-main .container { max-width: 900px; }
}

/* Left / Right panels — scoped to IDs (avoid clashing with Func/Box .left/.right) */
#index.candy-home #home-left {
  width: 50%;
  margin-right: 10px;
  transform: translateY(20px);
}

#index.candy-home #home-left.hidden {
  display: none;
}

#index.candy-home #home-right {
  width: 50%;
  margin-left: 0.75rem;
}

/* Vue: .right.hidden only hides below 720px; desktop always shows */
#index.candy-home #home-right.hidden {
  display: none;
}

@media (min-width: 721px) {
  #index.candy-home #home-right.hidden {
    display: block;
  }
  #index.candy-home #home-left.hidden {
    display: block;
  }
}

@media (max-width: 720px) {
  #index.candy-home #candy-home-main .container {
    height: 100%;
    min-height: 100%;
    min-height: var(--candy-vh, 100%);
    max-width: none;
    padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  }

  #index.candy-home #home-all {
    padding: max(12px, env(safe-area-inset-top, 0px)) 0.5rem calc(24px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    box-sizing: border-box;
  }

  #index.candy-home #home-left {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    transform: none;
  }
  #index.candy-home #home-right {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding-top: clamp(52px, 12vh, 88px);
    box-sizing: border-box;
  }
  #index.candy-home #home-right.hidden {
    display: none;
  }
  #index.candy-home .xs-hidden {
    display: none;
  }
}

/* Message — Message.vue */
#index.candy-home .message .logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  animation: fade 0.5s;
  max-width: 460px;
}

#index.candy-home .message .logo-img {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

#index.candy-home .message .name {
  width: 100%;
  padding-left: 22px;
  transform: translateY(-8px);
  font-family: "Pacifico-Regular", var(--candy-font-sans), cursive;
  color: #fff;
  line-height: 1.1;
  overflow: visible;
  white-space: nowrap;
}

#index.candy-home .message .name .name-main {
  font-size: 5rem;
  font-family: inherit;
  position: static;
  width: auto;
  height: auto;
  z-index: auto;
  background: none;
}

#index.candy-home .message .name .name-sub {
  margin-left: 6px;
  font-size: 2rem;
  font-family: inherit;
}

@media (min-width: 721px) and (max-width: 789px) {
#index.candy-home .message .name .name-sub { display: none; }
}

@media (max-width: 768px) {
#index.candy-home .message .logo-img {
    width: 100px;
    height: 100px;
  }
#index.candy-home .message .name { height: auto; min-height: 80px; }
#index.candy-home .message .name .name-main { font-size: 4.5rem; }
}

@media (max-width: 720px) {
  #index.candy-home .message .logo {
    max-width: 100%;
    gap: 4px;
  }
  #index.candy-home .message .logo-img {
    width: 88px;
    height: 88px;
  }
  #index.candy-home .message .name {
    padding-left: 14px;
    transform: translateY(-4px);
    min-height: 0;
  }
  #index.candy-home .message .name .name-main {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }
  #index.candy-home .message .name .name-sub {
    font-size: clamp(1.15rem, 5vw, 1.75rem);
  }
  #index.candy-home .message .description {
    max-width: 100%;
    margin-top: clamp(1.25rem, 4vh, 2.5rem);
    padding: 0.85rem;
  }
  #index.candy-home .message .description .text {
    height: 6.25rem;
    margin: 0.5rem 0.15rem;
  }
  #index.candy-home .social {
    margin-top: 0.75rem;
    max-width: 100%;
  }
  #index.candy-home .social .link {
    gap: 20px;
  }
}

#index.candy-home .message .description {
  display: block;
  padding: 1rem;
  margin-top: 3.5rem;
  max-width: 460px;
  animation: fade 0.5s;
  cursor: pointer;
  transition: transform 0.2s;
  color: #fff;
  text-decoration: none;
}

#index.candy-home .message .description:hover {
  color: #fff;
  text-decoration: none;
}

#index.candy-home .message .description:active { transform: scale(0.98); }

#index.candy-home .message .description .content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
}

#index.candy-home .message .description .text {
  margin: 0.5rem 0.2rem;
  transition: opacity 0.2s;
  height: 7rem;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

#index.candy-home .message .description .text p {
  margin: 0;
}

#index.candy-home .message .description .text p:nth-of-type(1) {
  font-family: "Pacifico-Regular", var(--candy-font-sans), cursive;
  font-size: 1.45rem;
  flex-shrink: 0;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

#index.candy-home .message .description .text p:nth-of-type(2) {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  font-family: var(--candy-font-sans);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  word-break: break-word;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

@media (min-width: 721px) {
  #index.candy-home .message .description {
    max-width: 520px;
  }
  #index.candy-home .message .description .text {
    height: 7.5rem;
  }
  #index.candy-home .message .description .text p:nth-of-type(1) {
    font-size: 1.65rem;
  }
  #index.candy-home .message .description .text p:nth-of-type(2) {
    font-size: 1.125rem;
  }
  #index.candy-home .social {
    max-width: 520px;
  }
}

#index.candy-home .message .quote {
  display: inline-flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.9;
  line-height: 1;
}

#index.candy-home .message .quote svg {
  width: 16px;
  height: 16px;
  display: block;
}

#index.candy-home .message .quote-right {
  align-self: flex-end;
}

/* Social — SocialLinks.vue */
#index.candy-home .social {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 460px;
  width: 100%;
  height: 42px;
  background-color: transparent;
  border-radius: 6px;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  animation: fade 0.5s;
  transition: background-color 0.3s, backdrop-filter 0.3s;
}

#index.candy-home .social .link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 24px;
}

#index.candy-home .social .link a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  overflow: hidden;
  line-height: 0;
}

#index.candy-home .social .social-icon {
  display: block;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  line-height: 0;
  transition: transform 0.3s;
}

#index.candy-home .social .icon,
#index.candy-home .social .social-icon svg,
#index.candy-home .social svg.icon,
#index.candy-home .social .social-icon img {
  margin: 0;
  padding: 0;
  display: block;
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  overflow: hidden;
  transition: transform 0.3s;
}

#index.candy-home .social .icon.mdi {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 24px;
}

#index.candy-home .social .link a:hover .social-icon,
#index.candy-home .social .link a:hover > .icon,
#index.candy-home .social .link a:hover > .icon-fallback {
  transform: scale(1.1);
}
#index.candy-home .social .link a:active .social-icon,
#index.candy-home .social .link a:active > .icon,
#index.candy-home .social .link a:active > .icon-fallback {
  transform: scale(1);
}

#index.candy-home .social .icon-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

#index.candy-home .social .tip {
  display: none;
  margin-right: 12px;
  animation: fade 0.5s;
}

@media (min-width: 768px) {
#index.candy-home .social:hover {
    background-color: #00000040;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
#index.candy-home .social:hover .tip { display: block; }
}

@media (max-width: 840px) {
#index.candy-home .social {
    max-width: 100%;
    justify-content: center;
  }
#index.candy-home .social .link {
    justify-content: space-evenly !important;
    width: 90%;
  }
#index.candy-home .social .tip { display: none !important; }
}

/* Mobile logo — Right.vue */
#index.candy-home .mobile-logo {
  width: 100%;
  font-family: "Pacifico-Regular", var(--candy-font-sans), cursive;
  font-size: 2.25rem;
  position: fixed;
  top: 6%;
  left: 0;
  text-align: center;
  transition: transform 0.3s;
  animation: fade 0.5s;
  display: none;
  cursor: pointer;
  z-index: 3;
  color: #fff;
}

#index.candy-home .mobile-logo .name-main,
#index.candy-home .mobile-logo .name-sub {
  position: static;
  width: auto;
  height: auto;
  z-index: auto;
  background: none;
}

#index.candy-home .mobile-logo:active {
  transform: scale(0.95);
}

@media (max-width: 720px) {
  #index.candy-home .mobile-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    top: max(6%, calc(12px + env(safe-area-inset-top, 0px)));
    font-size: clamp(1.65rem, 7vw, 2.25rem);
    line-height: 1.15;
  }
}

@media (min-width: 721px) {
  #index.candy-home .mobile-logo { display: none !important; }
}

@media (max-height: 720px) and (max-width: 720px) {
  #index.candy-home .mobile-logo {
    width: 100%;
    top: max(12px, env(safe-area-inset-top, 0px));
  }
}

/* Function — Func/index.vue */
#index.candy-home .function {
  height: 165px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#index.candy-home .func-row {
  height: 100%;
  width: 100%;
  display: flex;
  margin: 0;
}

#index.candy-home .func-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  width: 50%;
}

#index.candy-home .func-col.hitokoto-col {
  padding-left: 0;
  padding-right: 10px;
}

#index.candy-home .func-col.time-col {
  padding-left: 10px;
  padding-right: 0;
}

.func-left,
#index.candy-home .func-right {
  width: 100%;
  height: 100%;
}

#index.candy-home .hitokoto {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px;
  animation: fade 0.5s;
  cursor: pointer;
}

#index.candy-home .hitokoto .content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

#index.candy-home .hitokoto .text {
  font-family: var(--candy-font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.04em;
  word-break: break-word;
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#index.candy-home .hitokoto .from {
  margin-top: 12px;
  font-family: var(--candy-font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  opacity: 0.92;
  align-self: flex-end;
}

#index.candy-home .time-weather {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  animation: fade 0.5s;
  box-sizing: border-box;
  overflow: hidden;
}

#index.candy-home .time-weather .time {
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#index.candy-home .time-weather .time:active {
  transform: scale(0.98);
  opacity: 0.9;
}

#index.candy-home .time-weather .time .date {
  margin-top: 8px;
  max-width: 100%;
  flex-shrink: 0;
  font-family: var(--candy-font-sans);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

#index.candy-home .time-weather .time .date-ymd {
  text-overflow: ellipsis;
  overflow-x: hidden;
  white-space: nowrap;
}

#index.candy-home .time-weather .time .date-weekday {
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 400;
  opacity: 0.92;
  letter-spacing: 0.12em;
}

#index.candy-home .time-weather .time .text,
#index.candy-home .time-weather .time .text #clock-hms,
#index.candy-home #clock-hms {
  margin-top: 8px;
  font-size: 3.25rem;
  letter-spacing: 2px;
  font-family: "UnidreamLED", var(--candy-font-mono);
  font-weight: normal;
  line-height: 1.15;
}

#clock-hms {
  margin-top: 0;
  display: inline-block;
}

#index.candy-home .time-weather .weather {
  text-align: center;
  width: 100%;
  text-overflow: ellipsis;
  overflow-x: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}

/* Mobile: logo tap shows hitokoto, hides clock (Func.mobile — match Vue) */
@media (max-width: 910px) {
#index.candy-home .hitokoto-col {
    display: none;
  }
#index.candy-home .time-col {
    flex: none;
    max-width: none;
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
#index.candy-home .function.mobile .hitokoto-col {
    display: contents;
  }
#index.candy-home .function.mobile .time-col {
    display: none;
  }
}

@media (min-width: 1201px) and (max-width: 1280px) {
#index.candy-home .time-weather .time { font-size: 1rem; }
}

@media (min-width: 911px) and (max-width: 992px) {
#index.candy-home .time-weather .time { font-size: 1rem; }
  .time-weather .time .text,
  .time-weather .time .text #clock-hms,
  #clock-hms { font-size: 2.75rem; }
}

@media (min-width: 910px) and (max-width: 1200px) {
#index.candy-home .sm-hidden { display: none; }
}

/* Links — Links.vue (pager via home-links-pages + dots; no Swiper) */
#index.candy-home .links .line {
  margin: 2rem 0.25rem 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  animation: fade 0.5s;
}

#index.candy-home .links .line-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

#index.candy-home .links .line-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

#index.candy-home .links .title {
  margin-left: 8px;
  font-size: 1.15rem;
  text-shadow: 0 0 5px #00000050;
}

/* el-row gutter 20 / span 8 — Element Plus row uses negative margin */
#index.candy-home .link-all {
  height: 220px;
  display: flex;
  flex-wrap: wrap;
  row-gap: 20px;
  margin-left: -10px;
  margin-right: -10px;
}

#index.candy-home .link-all .link-col {
  flex: 0 0 33.3333333333%;
  max-width: 33.3333333333%;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

#index.candy-home .link-all .item {
  height: 100px;
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  padding: 0 10px;
  animation: fade 0.5s;
  color: #fff;
  text-decoration: none;
}

#index.candy-home .link-all .item .item-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
}

#index.candy-home .link-all .item .item-icon svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: currentColor;
}

#index.candy-home .link-all .item .name {
  font-size: 1.1rem;
  margin-left: 8px;
}

@media (min-width: 720px) and (max-width: 820px) {
#index.candy-home .link-all .item .name { display: none; }
}

@media (max-width: 720px) {
  #index.candy-home .function {
    height: 148px;
  }
  #index.candy-home .hitokoto {
    padding: 16px;
  }
  #index.candy-home .time-weather {
    padding: 12px 16px;
  }
  .time-weather .time .text,
  .time-weather .time .text #clock-hms,
  #clock-hms {
    font-size: clamp(2.35rem, 10vw, 3rem);
    letter-spacing: 1px;
  }
  #index.candy-home .time-weather .time .date {
    margin-top: 4px;
    font-size: 0.9rem;
  }
  #index.candy-home .links .line {
    margin: 1.25rem 0.25rem 0.75rem;
  }
  #index.candy-home .link-all {
    row-gap: 12px;
    height: 172px;
    margin-left: -6px;
    margin-right: -6px;
  }
  #index.candy-home .link-all .link-col {
    padding-left: 6px;
    padding-right: 6px;
  }
  #index.candy-home .link-all .item {
    height: 80px;
    padding: 0 6px;
  }
  #index.candy-home .link-all .item .name {
    font-size: 1rem;
  }
}

@media (max-width: 460px) {
  #index.candy-home .link-all .item {
    flex-direction: column;
  }
  #index.candy-home .link-all .item .name {
    font-size: 1rem;
    margin-left: 0;
    margin-top: 8px;
  }
  #index.candy-home .link-all .item .item-icon {
    width: 22px;
    height: 22px;
  }
}

/* Mobile menu — App.vue .menu (must NOT use bare .menu — clashes with Music.vue .menu) */
#mobile-menu {
  position: absolute;
  display: none;
  justify-content: center;
  align-items: center;
  top: 84%;
  left: calc(50% - 28px);
  right: auto;
  width: 56px;
  height: 34px;
  background: rgb(0 0 0 / 20%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  border: 0;
  padding: 0;
  transition: transform 0.3s;
  animation: fade 0.5s;
  cursor: pointer;
  z-index: 30;
  color: #fff;
  box-sizing: border-box;
}

#mobile-menu[hidden] {
  display: none !important;
}

#mobile-menu:active {
  transform: scale(0.95);
}

#mobile-menu .menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fff;
}

#mobile-menu .menu-icon .mdi {
  font-size: 22px !important;
  margin-right: 0 !important;
  line-height: 1;
}

/* display:flex above beats bare [hidden] */
#mobile-menu .menu-icon[hidden] {
  display: none !important;
}

#mobile-menu .menu-icon .i-icon {
  transform: translateY(2px);
  display: block;
}

@media (max-width: 720px) {
  /* !important：压过 body.on-index .menu 的隐藏与站点顶栏 .menu 布局
   * fixed + 抬高 bottom：避开 iOS Safari 底栏 / Home Indicator */
  body.on-index #index.candy-home #mobile-menu,
  #index.candy-home #mobile-menu {
    display: flex !important;
    position: fixed;
    top: auto;
    bottom: max(88px, calc(56px + env(safe-area-inset-bottom, 0px)));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 60px;
    height: 38px;
    border-radius: 10px;
    background: rgb(0 0 0 / 28%);
    z-index: 30;
  }
  #index.candy-home #mobile-menu:active {
    transform: translateX(-50%) scale(0.95);
  }
  /* 时光胶囊 / 起始页打开：隐藏汉堡（配合 [hidden]） */
  body.on-index #index.candy-home #mobile-menu[hidden],
  #index.candy-home #mobile-menu[hidden] {
    display: none !important;
  }
  /* 兜底：起始页 / 时光胶囊已开时即使 JS 未写 hidden 也藏汉堡 */
  #index.candy-home:has(#link-popup:not([hidden])) #mobile-menu,
  #index.candy-home:has(#home-box:not([hidden])) #mobile-menu {
    display: none !important;
  }
}

@media (min-width: 721px) {
  #index.candy-home #mobile-menu {
    display: none !important;
  }
}

/* Footer — Footer.vue */
#index.candy-home #footer {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 46px;
  line-height: 46px;
  text-align: center;
  z-index: 0;
  font-size: 10px;
  background: transparent;
  word-break: keep-all;
  white-space: nowrap;
}

#index.candy-home #footer[hidden] {
  display: none !important;
}

#index.candy-home #footer.blur {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: transparent;
}

#index.candy-home #footer .power { animation: fade 0.3s; }



#index.candy-home #footer .hidden { display: none; }

@media (max-width: 720px) {
  #index.candy-home #footer {
    height: auto;
    min-height: 40px;
    line-height: 1.4;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    white-space: normal;
    word-break: break-word;
    font-size: 10px;
    box-sizing: border-box;
  }
  #index.candy-home #footer .power {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 4px;
  }
}

@media (max-width: 560px) {
  #footer .c-hidden { display: none; }
}

@media (max-width: 480px) {
  #footer .hidden { display: none; }
}

/* Short phones: further compress vertical rhythm */
@media (max-width: 720px) and (max-height: 700px) {
  #index.candy-home #home-all {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  #index.candy-home .message .description {
    margin-top: 1rem;
  }
  #index.candy-home .message .description .text {
    height: 5.75rem;
  }
  #index.candy-home .function {
    height: 132px;
  }
  #index.candy-home .links .line {
    margin-top: 0.85rem;
  }
  #index.candy-home .link-all {
    row-gap: 14px;
    height: 150px;
  }
  #index.candy-home .link-all .item {
    height: 68px;
  }
  #index.candy-home #mobile-menu {
    bottom: max(72px, calc(48px + env(safe-area-inset-bottom, 0px)));
  }
}

/* Toast (ElMessage stand-in) */


/* Short / narrow viewports — fit viewport; do not scroll the whole #candy-home-main canvas */
@media (max-height: 720px) {
  #candy-home-main {
    overflow: hidden;
  }
  #candy-home-main .container {
    height: 100%;
    min-height: 100%;
  }
  #candy-home-main .more {
    height: 100%;
    min-height: 100%;
  }
  @media (min-width: 391px) {
    #candy-home-main .container {
      padding-left: 0.7vw;
      padding-right: 0.25vw;
    }
    #footer {
      padding-left: 6px;
    }
  }
  @media (min-width: 391px) and (max-width: 1200px) {
    #candy-home-main .container {
      padding-left: 2.3vw;
      padding-right: 1.75vw;
    }
  }
  @media (min-width: 391px) and (max-width: 1100px) {
    #candy-home-main .container {
      padding-left: 2vw;
      padding-right: calc(2vw - 6px);
    }
  }
  @media (min-width: 391px) and (max-width: 992px) {
    #candy-home-main .container {
      padding-left: 2.3vw;
      padding-right: 1.7vw;
    }
  }
  @media (min-width: 391px) and (max-width: 900px) {
    #candy-home-main .container {
      padding-left: 2vw;
      padding-right: calc(2vw - 6px);
    }
  }
}

@media (max-width: 390px) {
  #candy-home-main {
    overflow: hidden;
  }
  #candy-home-main .container {
    width: 100%;
  }
  #footer {
    width: 100%;
  }
  #index.candy-home .message .logo-img {
    width: 76px;
    height: 76px;
  }
  #index.candy-home .social .link {
    gap: 16px;
  }
}

/* 全局隐藏滚动条（仍可滚动） */
#index.candy-home html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#index.candy-home * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#index.candy-home *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}