/*
 * 182 懷舊服首頁微調
 * 保留原始 style.css；若要還原，只需移除本檔案及 index.html 的載入標籤。
 */

@font-face {
  font-family: "ZiHunWeb";
  src:
    local("zihunbaigetianxingti"),
    local("ZiHunBaiGeTianXingTi"),
    local("字魂白鸽天行体");
  font-display: swap;
}

html {
  background: #070503;
}

:root {
  --seal-font:
    "ZiHunWeb",
    "zihunbaigetianxingti",
    "ZiHunBaiGeTianXingTi",
    "字魂白鸽天行体",
    "ZiHun BaiGe TianXingTi",
    "DFPGuYin-W7",
    "DFGuYin-W7",
    "華康古印體",
    "古印體",
    "DFKai-SB",
    "標楷體",
    "BiauKai",
    "KaiTi",
    serif;
}

body {
  min-height: 100vh;
  font-family:
    "zihunbaigetianxingti",
    "ZiHunBaiGeTianXingTi",
    "字魂白鸽天行体",
    "ZiHun BaiGe TianXingTi",
    "DFKai-SB",
    "標楷體",
    "Microsoft JhengHei",
    sans-serif;
  background-color: #070503;
  background-image:
    linear-gradient(rgba(5, 3, 2, 0.3), rgba(5, 3, 2, 0.3)),
    url("final-assets/background/hero-village-logo-cross-aligned-v5.png");
  background-position: center 66px;
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body,
button,
input,
select,
textarea,
.hero h1,
.portal-button strong,
.forum-menu-copy strong,
h2 {
  font-family: var(--seal-font);
}

main {
  display: block;
}

.site-header {
  background: rgba(10, 7, 4, 0.94);
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.header-inner {
  justify-content: center;
}

.wordmark {
  right: auto;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
}

.wordmark img {
  width: 150px;
  height: 48px;
  object-position: center;
}

.hero {
  order: 1;
  background: transparent;
}

.hero-details {
  align-items: flex-start;
  padding-top: clamp(165px, 13vw, 220px);
}

.hero-copy {
  width: max-content;
  max-width: calc(100vw - 48px);
  margin: 0 0 0 max(24px, 6vw);
}

.hero h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  white-space: nowrap;
}

.hero h1 em {
  display: inline;
}

.hero-actions {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 3;
  margin: 0;
}

.hero-art {
  background-image: none;
  background-color: transparent;
  background-position: center top;
  background-size: contain;
  background-repeat: no-repeat;
  height: clamp(500px, 34vw, 640px);
  min-height: 500px;
}

.notice,
footer {
  background-color: rgba(12, 8, 5, 0.94);
  backdrop-filter: blur(8px);
}

.notice {
  order: 3;
  width: min(calc(100% - 40px), 1180px);
  margin: 0 auto;
  border-inline: 1px solid rgba(221, 176, 91, 0.36);
}

.button {
  min-width: 138px;
  overflow: hidden;
  padding: 0.82rem 1.3rem;
  border-width: 1px;
  border-radius: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255, 245, 207, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 214, 0.92),
    inset 0 -3px 0 rgba(87, 45, 7, 0.58),
    0 4px 0 #4d2909,
    0 10px 24px rgba(0, 0, 0, 0.44);
  isolation: isolate;
}

.button::before {
  inset: 4px;
  border-color: rgba(255, 237, 172, 0.58);
  border-radius: 7px;
}

.button::after {
  position: absolute;
  top: -60%;
  left: -55%;
  z-index: -1;
  width: 38%;
  height: 220%;
  content: "";
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 247, 207, 0.48),
    transparent
  );
  transform: rotate(22deg);
  transition: left 0.45s ease;
}

.button:hover::after {
  left: 125%;
}

.button:hover {
  filter: brightness(1.13) saturate(1.08);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 214, 1),
    inset 0 -3px 0 rgba(87, 45, 7, 0.58),
    0 6px 0 #4d2909,
    0 14px 28px rgba(0, 0, 0, 0.5);
}

.button:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 214, 0.8),
    0 1px 0 #4d2909,
    0 5px 12px rgba(0, 0, 0, 0.38);
}

.button:focus-visible {
  outline: 3px solid rgba(255, 222, 132, 0.78);
  outline-offset: 4px;
}

.primary {
  color: #241505;
  border-color: #fff0ad;
  background: linear-gradient(180deg, #ffe59a 0%, #e4ae4e 52%, #ad6b1e 100%);
}

.secondary {
  color: #ffe9b5;
  border-color: #d9b767;
  background: linear-gradient(180deg, #4a321b 0%, #25170d 55%, #100b07 100%);
}

.portal-menu-section {
  display: none;
  position: relative;
  z-index: 2;
  order: 2;
  width: min(calc(100% - 40px), 1080px);
  margin: -12px auto 0;
  padding: 22px 20px;
  border: 2px solid #8f6024;
  border-radius: 4px 4px 0 0;
  background:
    linear-gradient(rgba(10, 7, 5, 0.96), rgba(24, 13, 7, 0.98)),
    radial-gradient(circle at 50% 0, rgba(166, 91, 27, 0.25), transparent 68%);
  box-shadow:
    inset 0 0 0 3px rgba(255, 210, 110, 0.08),
    0 -8px 24px rgba(0, 0, 0, 0.52),
    0 12px 26px rgba(0, 0, 0, 0.46);
}

.layout {
  display: grid;
  align-items: start;
}

.layout > div,
.layout > .sidebar {
  width: 100%;
  min-width: 0;
}

.portal-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.portal-button {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(128, 81, 26, 0.34);
  border-radius: 0;
  color: #f7ead0;
  background:
    linear-gradient(90deg, rgba(15, 9, 5, 0.99), rgba(5, 4, 3, 0.99));
  box-shadow:
    inset 0 0 20px rgba(121, 64, 16, 0.08),
    0 5px 13px rgba(0, 0, 0, 0.34);
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    border-color 0.18s ease;
}

.portal-button::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, #bd811d, rgba(189, 129, 29, 0.08));
  content: "";
  pointer-events: none;
}

.portal-logo {
  display: grid;
  place-items: center;
  margin: 8px;
  padding: 4px;
  border: 1px solid #bf8b25;
  background:
    radial-gradient(circle, rgba(125, 70, 20, 0.35), transparent 72%),
    #090604;
  background-image: url("final-assets/logo/logo-182-round-menu.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 174px auto;
}

.portal-logo img {
  display: block;
  width: 174px;
  height: 88px;
  object-fit: contain;
  opacity: 0;
}

.portal-button strong {
  display: grid;
  place-items: center start;
  padding: 0.8rem 1rem;
  font-family: Georgia, "Microsoft JhengHei", serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-shadow:
    0 2px 2px #000,
    0 0 10px rgba(222, 160, 69, 0.28);
}

.portal-button:hover {
  z-index: 1;
  border-color: #f2c76b;
  filter: brightness(1.14) saturate(1.08);
  transform: translateX(4px);
}

.portal-button:focus-visible {
  outline: 3px solid rgba(255, 222, 132, 0.85);
  outline-offset: 3px;
}

.forum-menu-button {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 100px;
  min-height: 96px;
  align-items: center;
  border-bottom: 1px solid rgba(221, 176, 91, 0.22);
  color: #f5e7c7;
  background: rgba(10, 7, 5, 0.84);
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.forum-menu-button:last-child {
  border-bottom: 0;
}

.forum-menu-logo {
  width: 145px;
  height: 76px;
  margin: 10px 14px;
  border: 1px solid #bd8429;
  background:
    #050403 url("final-assets/logo/logo-182-round-menu.png") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255, 216, 124, 0.09),
    0 3px 10px rgba(0, 0, 0, 0.4);
}

.forum-menu-copy {
  min-width: 0;
  padding: 0.8rem 1rem;
}

.forum-menu-copy strong,
.forum-menu-copy small {
  display: block;
}

.forum-menu-copy strong {
  margin-bottom: 0.22rem;
  color: #fff4d3;
  font-family: Georgia, "Microsoft JhengHei", serif;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
}

.forum-menu-copy small {
  color: #bcae96;
  font-size: 0.76rem;
}

.forum-menu-entry {
  margin-right: 18px;
  padding-left: 14px;
  border-left: 1px solid rgba(221, 176, 91, 0.35);
  color: #e8bd60;
  font-size: 0.78rem;
  text-align: center;
}

.forum-menu-button:hover {
  z-index: 1;
  background: linear-gradient(90deg, rgba(68, 37, 14, 0.95), rgba(18, 11, 7, 0.94));
  transform: translateX(4px);
}

.forum-menu-button:focus-visible {
  outline: 3px solid rgba(255, 222, 132, 0.82);
  outline-offset: -3px;
}

/* Rounded fantasy panel treatment */
.notice,
.quick-links,
.forum-section,
.side-card,
.status-card {
  overflow: hidden;
  border-color: rgba(219, 166, 76, 0.5);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 158, 0.08),
    inset 0 0 24px rgba(134, 72, 17, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.42);
}

.notice {
  margin-top: 14px;
  border-radius: 12px;
}

.notice b {
  border-radius: 999px;
  font-family: var(--seal-font);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.notice span {
  font-size: 0.92rem;
}

.quick-links {
  background: rgba(14, 9, 6, 0.94);
}

.quick-links a {
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.quick-links a:hover {
  color: #ffe6a2;
  background: linear-gradient(180deg, rgba(77, 41, 14, 0.95), rgba(25, 15, 9, 0.95));
  transform: translateY(-2px);
}

.quick-links strong {
  font-family: var(--seal-font);
  font-size: 1.12rem;
  letter-spacing: 0.08em;
}

.quick-links small {
  margin-top: 0.16rem;
  font-size: 0.78rem;
}

.forum-section,
.side-card,
.status-card {
  background: rgba(14, 9, 6, 0.94);
  backdrop-filter: blur(9px);
}

.forum-section header {
  position: relative;
  padding-block: 1.25rem;
  background:
    radial-gradient(circle at 18% 0, rgba(156, 87, 24, 0.24), transparent 46%),
    linear-gradient(90deg, #4a2910, #1d1109 68%, #0d0906);
}

.forum-section header::after {
  position: absolute;
  right: 22px;
  bottom: 0;
  left: 22px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #d3a14b, transparent);
}

.forum-section h2,
.side-card h2,
.status-card h2 {
  font-family: var(--seal-font);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
}

.forum-section [data-forum] {
  padding: 11px;
}

.forum-menu-button {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(205, 145, 52, 0.42);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0 50%, rgba(132, 69, 19, 0.14), transparent 40%),
    rgba(9, 6, 4, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 166, 0.07),
    0 5px 14px rgba(0, 0, 0, 0.28);
}

.forum-menu-button:last-child {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(205, 145, 52, 0.42);
}

.forum-menu-button:hover {
  border-color: rgba(242, 194, 101, 0.78);
  background:
    radial-gradient(circle at 0 50%, rgba(164, 87, 22, 0.28), transparent 44%),
    linear-gradient(90deg, rgba(57, 30, 12, 0.98), rgba(15, 9, 6, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 171, 0.12),
    0 9px 21px rgba(0, 0, 0, 0.36);
}

.forum-menu-logo {
  overflow: hidden;
  border-radius: 10px;
}

.forum-menu-copy strong {
  font-family: var(--seal-font);
  font-size: 1.24rem;
  line-height: 1.25;
  letter-spacing: 0.09em;
}

.forum-menu-copy small {
  margin-top: 0.3rem;
  font-size: 0.82rem;
}

.forum-menu-entry {
  margin-right: 14px;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(207, 150, 58, 0.28);
  border-radius: 999px;
  background: rgba(90, 48, 14, 0.22);
  font-family: var(--seal-font);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
}

.status-card dl div:last-child,
.side-card li:last-child {
  border-bottom: 0;
}

.side-card li a,
.status-card dt,
.status-card dd {
  font-size: 0.84rem;
}

/* Semi-transparent panels keep the approved background artwork visible. */
.notice {
  background: rgba(12, 8, 5, 0.2);
  backdrop-filter: none;
}

.quick-links,
.forum-section,
.side-card,
.status-card {
  background: rgba(12, 8, 5, 0.2);
  backdrop-filter: none;
}

.quick-links a {
  background: rgba(12, 8, 5, 0.7);
}

.forum-section header {
  background: rgba(12, 8, 5, 0.2);
}

.forum-menu-button {
  background: rgba(9, 6, 4, 0.5);
}

.forum-menu-button:hover {
  background:
    radial-gradient(circle at 0 50%, rgba(164, 87, 22, 0.14), transparent 44%),
    rgba(15, 9, 6, 0.62);
}

.quick-links a:hover {
  background: rgba(43, 27, 13, 0.8);
}

/* Increase visible website text by approximately 2px without scaling panels. */
body {
  font-size: 17px;
}

.site-header nav a {
  font-size: calc(0.82rem + 2px);
}

.wordmark span {
  font-size: calc(0.5rem + 2px);
}

.hero-copy p,
.forum-section header p,
.side-card > p,
.status-card > p {
  font-size: calc(0.68rem + 2px);
}

.button {
  font-size: calc(0.85rem + 2px);
}

.notice b {
  font-size: calc(0.8rem + 2px);
}

.notice span {
  font-size: calc(0.92rem + 2px);
}

.quick-links strong {
  font-size: calc(1.12rem + 2px);
}

.quick-links small {
  font-size: calc(0.78rem + 2px);
}

.forum-section h2,
.side-card h2,
.status-card h2 {
  font-size: calc(1.55rem + 2px);
}

.forum-menu-copy strong {
  font-size: calc(1.24rem + 2px);
}

.forum-menu-copy small {
  font-size: calc(0.82rem + 2px);
}

.forum-menu-entry {
  font-size: calc(0.86rem + 2px);
}

.side-card li a,
.status-card dt,
.status-card dd {
  font-size: calc(0.84rem + 2px);
}

.side-card li span,
footer .container {
  font-size: calc(0.75rem + 2px);
}

@media (max-width: 1020px) {
  .portal-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-button {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .portal-logo {
    background-size: 134px auto;
  }

  .portal-logo img {
    width: 134px;
  }

  .forum-menu-button {
    grid-template-columns: 145px minmax(0, 1fr) 88px;
  }

  .forum-menu-logo {
    width: 121px;
    height: 68px;
  }
}

@media (max-width: 760px) {
  body {
    background-size: auto 100vh;
    background-position: center 66px;
  }

  .wordmark img {
    width: 132px;
  }

  .button {
    min-width: 126px;
    padding-inline: 1rem;
  }

  .hero-details {
    padding-top: 96px;
  }

  .hero-actions {
    top: 14px;
    left: 4%;
  }

  .hero-copy {
    max-width: 92vw;
    margin-left: 4%;
  }

  .hero h1 {
    font-size: clamp(1.15rem, 5vw, 1.9rem);
  }

  .hero-art {
    height: 500px;
    min-height: 500px;
  }

  .portal-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-button {
    grid-template-columns: 125px minmax(0, 1fr);
    min-height: 86px;
  }

  .portal-logo img {
    width: 109px;
    height: 68px;
  }

  .portal-logo {
    background-size: 109px auto;
  }

  .portal-button strong {
    font-size: 1rem;
  }

  .forum-menu-button {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .forum-menu-logo {
    width: 98px;
    height: 58px;
    margin-inline: 10px;
  }

  .forum-menu-copy {
    padding-inline: 0.55rem;
  }

  .forum-menu-entry {
    display: none;
  }
}

@media (max-width: 480px) {
  .portal-menu {
    grid-template-columns: 1fr;
  }
}
