.dark .top nav a,
.dark .account,
.dark .account a,
.dark .account button { color: #fff; }
.dark .account .outline { border-color: #ffffff88; }
.admin-list form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-list input,.admin-list textarea { padding: 9px; border: 1px solid #c8bda9; border-radius: 7px; }
.admin-list textarea { width: 100%; min-height: 76px; }
.admin-create { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; padding: 18px; margin-bottom: 28px; background: #efe3cf; border-radius: 12px; }
.admin-create h3,.admin-create textarea,.admin-create button { grid-column: 1 / -1; }
.admin-content { padding: 24px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 18px 0; line-height: 1.8; }
.admin-content img { max-width: 100%; }
.adjust input { width: 90px; }
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.status-grid article { border: 1px solid #ddd; padding: 18px !important; border-radius: 10px; }
@media (max-width: 700px) { .admin-create,.status-grid { grid-template-columns: 1fr; } .admin-create > * { grid-column: 1 !important; } }

/* Site-wide interaction motion */
.top nav a,
.account a,
.account button,
.actions a,
.btn,
.cards > a,
.gallery-grid > a,
.game,
.rank-grid a,
.rank-grid .rank-row,
.post-list a,
.tabs a,
.admin-grid aside a,
.admin-list article,
.admin-list button,
.social button,
.switch,
.reaction button,
.comments button,
.editor button,
footer nav a,
details summary {
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease,
    border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease,
    filter 180ms ease;
}

.top nav a,
.account > a,
footer nav a {
  position: relative;
}

.top nav a::after,
.account > a::after,
footer nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -8px;
  height: 2px;
  background: var(--orange);
  transition: left 180ms ease, right 180ms ease;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .top nav a:hover,
  .account > a:hover,
  footer nav a:hover {
    color: var(--orange);
    transform: translateY(-2px);
  }

  .top nav a:hover::after,
  .account > a:hover::after,
  footer nav a:hover::after {
    left: 0;
    right: 0;
  }

  .account button:hover,
  .admin-list button:hover,
  .social button:hover,
  .switch:hover,
  .reaction button:hover,
  .comments button:hover,
  .editor button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 6px 0 #11182722;
  }

  .btn:hover {
    transform: translate(-2px, -3px);
    box-shadow: 8px 10px 0 var(--ink);
    filter: saturate(1.12) brightness(1.04);
  }

  .actions > a:not(.btn):hover {
    color: var(--orange);
    transform: translateX(5px);
  }

  .cards > a:hover,
  .gallery-grid > a:hover {
    transform: translate(-5px, -6px) rotate(-0.25deg);
    box-shadow: 13px 16px 0 #0b0e13;
  }

  .gallery-grid > a:hover i {
    display: inline-block;
    animation: hover-pop 420ms ease;
  }

  .game:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 45px #070b1280;
    filter: saturate(1.1) brightness(1.05);
  }

  .rank-grid a:hover,
  .rank-grid .rank-row:hover,
  .post-list a:hover {
    transform: translateX(7px);
    border-color: var(--orange);
    background: #fff2da;
    box-shadow: -5px 0 0 var(--orange), 0 8px 20px #13172014;
  }

  .tabs a:hover {
    transform: translateY(-3px);
    color: #fff;
    background: var(--orange);
    box-shadow: 0 6px 0 #11182722;
  }

  .admin-grid aside a:hover {
    transform: translateX(6px);
    background: #ffffff2b;
    color: var(--yellow);
  }

  .admin-list article:hover {
    transform: translateY(-2px);
    background: #fff1d8;
    box-shadow: 0 7px 18px #11182712;
  }

  details summary:hover {
    color: var(--orange);
    transform: translateX(3px);
  }
}

.rank-grid .rank-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: #fffaf0;
  border-radius: 10px;
}
.rank-grid .rank-row b { color: var(--orange); font-size: 22px; }
.rank-grid .rank-row strong { color: #777; }
@media (max-width: 900px) {
  .rank-grid .rank-row { grid-template-columns: 55px 1fr; }
  .rank-grid .rank-row strong { grid-column: 2; }
}

.archive-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 26px; align-items: start; }
.category-panel { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 7px; padding: 18px; border: 1px solid #3a4657; border-radius: 14px; background: #151d28; box-shadow: 7px 9px 0 #0a0e14; }
.category-panel strong { padding: 3px 9px 12px; color: var(--yellow); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.category-panel a { display: block; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px; color: #dce3ed; font-weight: 800; line-height: 1.25; transition: transform 160ms ease,color 160ms ease,background-color 160ms ease,border-color 160ms ease; }
.category-panel a.active { color: #171a20; background: var(--yellow); border-color: var(--yellow); box-shadow: 3px 4px 0 #070b11; }
.archive-board { min-width: 0; margin: 0; }
.empty-list { padding: 30px; text-align: center; color: #6f6b64; }
@media (hover:hover) and (pointer:fine) {
  .category-panel a:not(.active):hover { color: #fff; background: #ffffff18; border-color: #ffffff2c; transform: translateX(5px); }
}
@media (max-width: 760px) {
  .archive-layout { display: block; }
  .category-panel { position: static; flex-direction: row; overflow-x: auto; margin-bottom: 18px; padding: 12px; border-radius: 11px; box-shadow: 4px 5px 0 #0a0e14; scrollbar-width: thin; }
  .category-panel strong { display: none; }
  .category-panel a { flex: 0 0 auto; white-space: nowrap; }
}

.post .meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.author-identity { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.level-badge,.rank-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 8px; border-radius: 6px; font-size: 11px; line-height: 1; letter-spacing: .3px; }
.level-badge { color: #101722; background: var(--yellow); box-shadow: 2px 3px 0 #101722; }
.rank-badge { color: #fff; background: #202938; }
.author-name { color: #171a20; font-weight: 900; }
.board-label { display: inline-block; margin: 18px 0 0 12px; color: var(--orange); font-weight: 900; }
.back-link { font-weight: 800; }
.reaction { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid #ded3c2; }
.reaction form,.comment-votes { display: flex; gap: 9px; }
.vote-button,.share-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 9px 15px; border: 1px solid #c8bba8; border-radius: 999px; background: #fffaf0; color: #222834; font-weight: 800; cursor: pointer; }
.vote-button b { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: #e9dfcf; font-size: 12px; }
.thumb-icon { width: 21px; height: 21px; fill: currentColor; }
.thumb-icon.down { transform: rotate(180deg); }
.vote-up { color: #1967d2; }
.vote-down { color: #c43a3a; }
.comments article.comment { padding: 22px 0; }
.comment header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.comment-content { padding: 18px 0; line-height: 1.8; }
.comment-votes .vote-button { min-height: 36px; padding: 6px 11px; font-size: 12px; }
.report-box,.reply-box { margin-top: 13px; }
.report-box summary,.reply-box summary { width: fit-content; cursor: pointer; font-weight: 800; }
.report-box input { width: min(460px,100%); padding: 11px; margin-top: 12px; border: 1px solid #bbb; border-radius: 8px; }
.comment-editor textarea,.reply-box textarea { width: 100%; min-height: 100px; margin: 12px 0; padding: 13px; border: 1px solid #bbb; border-radius: 9px; }
@media (hover:hover) and (pointer:fine) {
  .vote-up:hover { color: #fff; background: #1967d2; border-color: #1967d2; }
  .vote-down:hover { color: #fff; background: #c43a3a; border-color: #c43a3a; }
  .share-button:hover { color: #fff; background: #202938; border-color: #202938; }
  .author-name:hover { color: var(--orange); }
}

@keyframes hover-pop {
  50% { transform: translateY(-7px) rotate(5deg) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final responsive layout and account metadata */
.member-number {
  margin-left: 2px;
  color: #7b7469;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: .12em;
}

.arcade-stick {
  position: absolute;
  right: -18px;
  bottom: 18px;
  z-index: 5;
  width: 175px;
  height: auto;
  filter: drop-shadow(10px 14px 0 #15182025);
  animation: float 3.7s ease-in-out infinite -1.8s;
  pointer-events: none;
}

.critical-dice-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 35%, #ffcc4540 0 18%, transparent 45%),
    linear-gradient(115deg, #0d1020 0%, #171126 56%, #37172d 100%);
  border: 1px solid #ffffff20;
}
.critical-dice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.critical-dice-card .game-logo {
  position: relative;
  z-index: 2;
  width: min(100%, 320px);
  height: auto;
  margin: auto;
  filter: drop-shadow(0 18px 30px #0009);
}
.critical-dice-card > div { position: relative; z-index: 2; }

/* Community portal */
.compact-head { padding-top: 42px; padding-bottom: 36px; }
.compact-head h1 { margin-bottom: 14px; }
.community-portal {
  display: grid;
  grid-template-columns: 230px minmax(420px, 1fr) 270px;
  gap: 24px;
  align-items: start;
  padding: 34px max(3vw, 24px) 72px;
}
.community-left {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 122px);
  overflow: auto;
  padding: 0 8px 10px 0;
  scrollbar-width: thin;
}
.community-left .category-panel { position: static; box-shadow: none; }
.portal-ranking,
.portal-block,
.portal-summary {
  background: #fff8ed;
  color: #171a20;
  border: 1px solid #e4d7c4;
  border-radius: 16px;
}
.portal-ranking { padding: 14px; }
.portal-ranking > strong {
  display: block;
  padding: 3px 3px 11px;
  color: #161a22;
  font-size: 13px;
  letter-spacing: .4px;
}
.portal-ranking p {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 6px 3px;
  border-top: 1px solid #eadfce;
  font-size: 10px;
}
.portal-ranking p > b { color: var(--orange); font-size: 11px; }
.portal-ranking p > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.portal-ranking p > em { color: #776f63; font-size: 9px; font-style: normal; }
.portal-ranking .member-number { font-size: 8px; }
.community-menu .panel-group {
  display: block;
  margin: 10px 7px 2px;
  padding-top: 10px;
  border-top: 1px solid #ffffff1e;
  color: #8390a2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.community-center { min-width: 0; display: grid; gap: 22px; }
.portal-block { padding: 25px; }
.portal-block .section-head { gap: 18px; margin-bottom: 17px; }
.portal-block .section-head h2 { margin: 7px 0 0; font-size: 25px; }
.portal-block .section-head > a { color: #5e5a53; font-size: 12px; font-weight: 800; }
.portal-block .post-list a { grid-template-columns: 82px minmax(0, 1fr) auto; padding: 13px 14px; }
.portal-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.portal-gallery-grid > a {
  position: relative;
  min-width: 0;
  padding: 17px;
  border: 1px solid #ded2c0;
  border-radius: 11px;
  background: #fffdf8;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}
.portal-gallery-grid b { display: block; padding-right: 45px; }
.portal-gallery-grid span { position: absolute; top: 18px; right: 15px; color: var(--orange); font-size: 10px; font-weight: 900; }
.portal-gallery-grid p { overflow: hidden; margin: 8px 0 0; color: #6f695f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.portal-summary { position: sticky; top: 108px; padding: 22px; }
.portal-summary h2 { margin: 8px 0 18px; font-size: 25px; }
.portal-summary h3 { margin: 23px 0 9px; font-size: 13px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.summary-stats div { padding: 11px 5px; text-align: center; border-radius: 9px; background: #efe3d1; }
.summary-stats b,.summary-stats small { display: block; }
.summary-stats b { color: var(--orange); font-size: 18px; }
.summary-stats small { margin-top: 3px; color: #756e64; font-size: 8px; }
.summary-board-list { display: grid; }
.summary-board-list a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px; border-top: 1px solid #eadfce; font-size: 11px; }
.summary-board-list b { color: var(--orange); }
.attendance-link { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 14px; border-radius: 10px; background: var(--yellow); color: #171a20; font-size: 11px; }
@media (hover:hover) and (pointer:fine) {
  .portal-gallery-grid > a:hover { transform: translateY(-3px); border-color: var(--orange); box-shadow: 0 8px 18px #1c253015; }
  .summary-board-list a:hover { color: var(--orange); transform: translateX(3px); }
}

/* Support and legal pages */
.support-page { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(400px, 1.3fr); gap: 28px; max-width: 1120px; margin: 42px auto 75px; padding: 0 24px; }
.support-guide,.support-card,.policy-page { border-radius: 18px; background: #fff8ed; color: #171a20; }
.support-guide { padding: 34px; }
.support-guide h2 { margin: 10px 0 16px; font-size: 34px; }
.support-guide p,.support-guide li { color: #68635b; line-height: 1.75; }
.support-card { padding: 32px; }
.support-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.support-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 900; }
.support-form label:nth-of-type(4),.support-form label:nth-of-type(5),.support-form .support-consent,.support-form button { grid-column: 1 / -1; }
.support-form input,.support-form select,.support-form textarea { width: 100%; padding: 13px; border: 1px solid #c9bba7; border-radius: 8px; background: #fffdf8; }
.support-form textarea { min-height: 190px; resize: vertical; }
.support-consent { display: flex !important; grid-template-columns: auto 1fr; align-items: start; font-weight: 500 !important; line-height: 1.55; }
.support-consent input { width: auto; margin-top: 4px; }
.support-consent a { color: #b93625; text-decoration: underline; }
.support-hp { position: absolute !important; left: -9999px; }
.form-notice { padding: 13px 15px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.form-notice.success { background: #dff5e7; color: #176336; }
.form-notice.error { background: #ffe1dd; color: #9b261b; }
.policy-page { max-width: 980px; margin: 42px auto 75px; padding: 42px; }
.policy-meta { margin-bottom: 30px; padding: 13px 15px; border-radius: 8px; background: #efe3d1; color: #655f56; font-size: 12px; }
.policy-page section { padding: 8px 0 20px; border-bottom: 1px solid #e3d8c7; }
.policy-page h2 { margin-bottom: 9px; font-size: 20px; }
.policy-page p { margin: 0; color: #5e5a53; line-height: 1.85; }
.policy-page aside { margin-top: 28px; padding: 18px; border-radius: 10px; background: #19212b; color: #eef2f6; line-height: 1.7; }
.policy-page aside a { color: var(--yellow); font-weight: 900; }

/* Footer */
.site-footer { padding-top: 45px; }
.footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.footer-brand p { margin: 10px 0 0; color: #9fa7b2; font-size: 13px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; }
.site-footer .privacy-link { color: #fff; font-weight: 900; }
.footer-company { display: flex; flex-wrap: wrap; gap: 7px 18px; padding: 19px 0; border-top: 1px solid #ffffff14; border-bottom: 1px solid #ffffff14; color: #aab1bb; font-size: 11px; line-height: 1.6; }
.footer-company a { color: var(--yellow); font-weight: 800; }

/* Admin forms */
.admin-help { color: #6b645b; line-height: 1.6; }
.admin-title-row,.member-admin-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-search { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; margin: 16px 0 22px; }
.admin-search input { width: 100%; }
.admin-list article.gallery-admin-card,.admin-list article.member-admin-card { display: block; padding: 20px; margin-bottom: 11px; border: 1px solid #ded2c0; border-radius: 11px; }
.admin-member-number { color: #81786c; font-size: 10px; font-weight: 700; }
.member-admin-summary > strong { white-space: nowrap; color: #d8432f; font-size: 13px; }
.member-admin-card details { margin-top: 14px; }
.member-admin-card summary,.gallery-admin-card summary { cursor: pointer; font-weight: 900; }
.member-admin-edit { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 18px; margin-top: 15px; }
.member-admin-edit form,.gallery-edit { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 11px !important; padding: 16px; border-radius: 10px; background: #efe3d1; }
.member-admin-edit label,.gallery-edit label { display: grid; gap: 6px; font-size: 11px; font-weight: 900; }
.member-admin-edit input,.member-admin-edit select,.gallery-edit input,.gallery-edit textarea { width: 100%; }
.member-admin-edit button,.gallery-edit button,.gallery-edit label:last-of-type { grid-column: 1 / -1; }
.admin-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.admin-actions details { min-width: min(100%, 550px); }
.gallery-edit { margin-top: 12px; }
.admin-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.admin-pagination a { min-width: 33px; padding: 8px; border-radius: 6px; background: #efe3d1; text-align: center; font-size: 12px; font-weight: 900; }
.admin-pagination a.active { background: var(--orange); color: #fff; }

@media (max-width: 1180px) {
  .community-portal { grid-template-columns: 220px minmax(0, 1fr); }
  .portal-summary { position: static; grid-column: 2; }
}
@media (max-width: 800px) {
  .arcade-stick { right: -2px; bottom: 12px; width: 128px; }
  .critical-dice-card { grid-template-columns: 1fr; padding: 35px 25px; text-align: center; }
  .critical-dice-card .game-logo { width: min(230px, 75vw); }
  .community-portal { display: block; padding: 22px 14px 55px; }
  .community-left { position: static; max-height: none; overflow: visible; padding: 0; }
  .community-left .category-panel { display: flex; flex-direction: row; overflow-x: auto; margin: 14px 0 20px; }
  .community-left .category-panel strong,.community-left .panel-group { display: none; }
  .portal-summary { margin-top: 20px; }
  .portal-gallery-grid { grid-template-columns: 1fr; }
  .portal-block .post-list a { grid-template-columns: 65px minmax(0, 1fr); }
  .portal-block .post-list small { grid-column: 2; }
  .support-page { grid-template-columns: 1fr; margin-top: 24px; padding: 0 14px; }
  .support-form { grid-template-columns: 1fr; }
  .support-form label,.support-form button { grid-column: 1 !important; }
  .policy-page { margin: 24px 14px 55px; padding: 25px; }
  .footer-main { display: grid; }
  .site-footer .footer-links { justify-content: flex-start; gap: 15px; }
  .member-admin-summary,.admin-title-row { align-items: flex-start; flex-direction: column; }
  .member-admin-edit { grid-template-columns: 1fr; }
  .member-admin-edit form,.gallery-edit { grid-template-columns: 1fr; }
  .member-admin-edit button,.gallery-edit button,.gallery-edit label { grid-column: 1 !important; }
}
