/* ============================================================
   Yuuni — Traditional Dress-Up Portal
   Soft blush, rose, jade, and cloud-patterned styling.
   ============================================================ */
:root {
  --bg: #FBF6F1;
  --surface: #FFFFFF;
  --ink: #3E2E35;
  --ink-soft: #7A626B;
  --primary: #D96A7F;
  --primary-deep: #B04A60;
  --gold: #C9A25E;
  --jade: #7FA693;
  --blush: #F6E3E6;
  --cloud-blush: #F3D9E4;
  --cloud-rose: #E8A8C0;
  --cloud-mist: #DCE4F5;
  --shadow: 0 8px 30px rgba(176, 74, 96, .12);
  --radius: 20px;
  --font-display: "Playfair Display", "Noto Serif SC", serif;
  --font-body: "Nunito", "Noto Serif SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='120' viewBox='0 0 140 120'%3E%3Cpath d='M88 66c0-15-12-27-28-27-13 0-24 10-24 22 0 11 9 19 20 19 9 0 16-7 16-15 0-7-5-12-12-12-5 0-9 4-9 9' fill='none' stroke='%23E8A8C0' stroke-opacity='.08' stroke-width='8' stroke-linecap='round'/%3E%3Ccircle cx='92' cy='39' r='18' fill='%23DCE4F5' fill-opacity='.06'/%3E%3C/svg%3E"),
    radial-gradient(circle at 20% 30%, rgba(201,162,94,.04) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(217,106,127,.04) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 85%, rgba(127,166,147,.035) 0 2px, transparent 3px);
  background-size: 140px 120px, 120px 120px, 160px 160px, 200px 200px;
  line-height: 1.6;
  overflow-x: hidden;
}

body * { min-width: 0; }

button { font-family: inherit; cursor: pointer; }
a { color: var(--primary-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { background: var(--blush); border-radius: 6px; padding: .1em .4em; font-size: .9em; }
kbd { background: var(--blush); border: 1px solid rgba(201,162,94,.5); border-radius: 6px; padding: .05em .45em; font-size: .85em; }

/* ============ Buttons ============ */
.btn {
  border: none; border-radius: 999px;
  padding: .65rem 1.6rem; font-weight: 700; font-size: 1rem;
  display: inline-block; text-align: center;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); text-decoration: none; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--primary-deep); border: 2px solid var(--primary); }
.btn-ghost:hover { background: var(--blush); text-decoration: none; }
.btn-big { font-size: 1.15rem; padding: .85rem 2.4rem; box-shadow: var(--shadow); }
.btn-sm { font-size: .85rem; padding: .4rem 1.1rem; }

/* ============ 1. Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,246,241,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,162,94,.35);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem 1.25rem;
}
.logo {
  display: flex; align-items: center; gap: .55rem;
  color: var(--cloud-rose); font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 700; text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-word { color: var(--ink); }
.logo-zh { color: var(--gold); font-family: "Noto Serif SC", serif; }
.logo-sub { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.nav-link {
  background: none; border: none; font-size: 1rem; font-weight: 600;
  color: var(--ink); padding: .4rem .2rem; display: inline-flex; align-items: center; gap: .3rem;
}
.nav-link:hover { color: var(--primary-deep); text-decoration: none; }

.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + .4rem); left: 0;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  list-style: none; min-width: 190px; padding: .5rem;
  display: none; z-index: 110;
}
.dropdown-menu.dropdown-open { display: block; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: .5rem .8rem; border-radius: 10px;
  color: var(--ink); font-weight: 600;
}
.dropdown-menu a:hover { background: var(--blush); text-decoration: none; }

.search-box {
  display: flex; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid rgba(201,162,94,.45);
  border-radius: 999px; padding: .35rem .9rem; color: var(--ink-soft);
}
.search-box input {
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: .95rem; width: 170px; color: var(--ink);
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: .4rem;
}
.hamburger span { width: 24px; height: 2.5px; background: var(--primary-deep); border-radius: 2px; }

body:not(.view-game) .title-strip,
body:not(.view-game) .play-layout,
body:not(.view-game) .comments-section,
body:not(.view-game) .about-section {
  display: none;
}
body.view-game .more-games {
  display: none;
}

/* ============ 2. Home catalog ============ */
.catalog-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: .85rem; }
.catalog-heading .section-title { margin-bottom: 0; }

/* ============ 3. Title strip ============ */
.title-strip {
  max-width: 1440px; margin: 0 auto; padding: .8rem 1.25rem 0;
  font-size: .9rem; color: var(--ink-soft);
}

/* ============ 3. Play layout ============ */
.play-layout {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 1.25rem; padding: 1rem 1.25rem 2rem;
  align-items: start;
}

.side-rail {
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(201,162,94,.3);
  border-radius: var(--radius); padding: 1rem;
  position: sticky; top: 76px;
}
.rail-title {
  font-family: var(--font-display); font-size: 1.05rem;
  color: var(--primary-deep); margin-bottom: .8rem;
}
.rail-list { display: flex; flex-direction: column; gap: .6rem; }
.rail-item {
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto;
  column-gap: .6rem; align-items: center; text-align: left;
  background: var(--surface); border: 1px solid rgba(201,162,94,.25);
  border-radius: 14px; padding: .45rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rail-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rail-thumb {
  grid-row: 1 / 3; width: 52px; height: 52px; object-fit: cover;
  border-radius: 10px; background: var(--blush);
}
.rail-item-title { font-size: .82rem; font-weight: 700; line-height: 1.25; }
.rail-item-title, .game-title, .game-subtitle, .cover-title, .cover-tag, .card-title, .card-blurb { overflow-wrap: anywhere; }
.rail-item-cat { font-size: .72rem; color: var(--ink-soft); }

.thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; background: linear-gradient(135deg, var(--blush), #F0DFC0);
}

/* ---- Stage ---- */
.stage-column { min-width: 0; }
.stage-frame {
  position: relative; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(201,162,94,.4);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column;
}
.stage-frame:fullscreen { border-radius: 0; aspect-ratio: auto; }
.stage-frame::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 12px; height: 44px;
  z-index: 6; pointer-events: none; opacity: .42;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='52' viewBox='0 0 240 52'%3E%3Cpath d='M36 36c-13 0-23-7-23-17 0-9 10-16 22-16 6-8 19-11 30-6 7-5 19-4 25 3 11 0 19 6 19 15 0 12-13 21-30 21H36Z' fill='%23F3D9E4' fill-opacity='.32'/%3E%3Cpath d='M55 22c0-8 7-14 15-14 7 0 13 6 13 13 0 6-5 10-11 10-5 0-9-4-9-9 0-4 3-7 7-7M96 27c12 0 20-5 24-15' fill='none' stroke='%23E8A8C0' stroke-opacity='.34' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M154 34c-10 0-18-6-18-13 0-7 8-12 17-12 5-7 15-9 23-5 5-4 14-3 18 2 8 0 14 5 14 11 0 10-10 17-23 17h-31Z' fill='%23DCE4F5' fill-opacity='.28'/%3E%3C/svg%3E") left center / 240px 52px repeat-x;
}

.plum-corner {
  position: absolute; width: 34px; height: 34px; z-index: 5; pointer-events: none;
  border: 3px solid var(--gold); opacity: .7;
}
.corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-top-left-radius: 12px; }
.corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-top-right-radius: 12px; }
.corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-bottom-left-radius: 12px; }
.corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-bottom-right-radius: 12px; }

.stage-cover {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: .7rem; padding: 2rem 1.5rem; overflow-y: auto;
}
.cover-thumb-wrap { max-width: 260px; width: 60%; }
.cover-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 18px; border: 3px solid rgba(201,162,94,.5);
  box-shadow: var(--shadow);
}
.cover-title { font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); }
.cover-zh { color: var(--gold); font-family: "Noto Serif SC", serif; font-size: .75em; }
.cover-tag { color: var(--ink-soft); max-width: 46ch; }
.cover-license { font-size: .85rem; color: var(--ink-soft); max-width: 52ch; }
.cover-note { font-size: .82rem; color: var(--ink-soft); }
.cover-idle { font-size: 2.6rem; display: flex; gap: 1rem; }
.idle-petal { display: inline-block; animation: petal-sway 3.2s ease-in-out infinite; }
.idle-petal:nth-child(2) { animation-delay: .6s; }
.idle-petal:nth-child(3) { animation-delay: 1.2s; }
@keyframes petal-sway { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(6deg); } }

.stage-iframe-wrap { position: relative; flex: 1; display: flex; min-height: 0; }
.stage-iframe-wrap iframe { flex: 1; width: 100%; border: none; background: #fff; }
.stage-loading {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; background: var(--surface); color: var(--ink-soft);
}
.loading-petal { font-size: 2.2rem; animation: petal-spin 1.6s linear infinite; display: inline-block; }
@keyframes petal-spin { to { transform: rotate(360deg); } }

/* ---- Game bar ---- */
.game-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem;
  background: var(--surface); border: 1px solid rgba(201,162,94,.3);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-top: 1rem; padding: .9rem 1.2rem;
}
.game-bar-main { min-width: 220px; flex: 1; }
.game-title { font-family: var(--font-display); font-size: 1.3rem; }
.game-subtitle { font-size: .88rem; color: var(--ink-soft); margin: .1rem 0 .35rem; }
.game-bar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.bar-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blush); border: 1px solid rgba(217,106,127,.4);
  color: var(--primary-deep); border-radius: 999px;
  padding: .5rem 1rem; font-weight: 700; font-size: .9rem;
  transition: background .15s ease, transform .15s ease;
}
.bar-btn:hover:not(:disabled) { background: #F2D3D9; transform: translateY(-1px); }
.bar-btn:disabled { opacity: .45; cursor: not-allowed; }
.bar-btn-active { background: var(--primary); color: #fff; }
.btn-exit { background: transparent; border-color: rgba(122,98,107,.4); color: var(--ink-soft); }
.btn-exit:hover:not(:disabled) { background: var(--blush); }

/* ============ 5/6. Modals & toast ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(62,46,53,.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  position: relative; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 460px; width: 100%; padding: 2rem;
  border-top: 5px solid var(--primary);
}
.modal h2 { font-family: var(--font-display); margin-bottom: .4rem; }
.modal-hint { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1rem; }
.modal-close {
  position: absolute; top: .8rem; right: .9rem;
  background: none; border: none; font-size: 1.1rem; color: var(--ink-soft);
}
.modal-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.2rem; }
.copy-row { display: flex; gap: .5rem; margin-bottom: 1rem; }
.copy-row input {
  flex: 1; min-width: 0; border: 1px solid rgba(201,162,94,.45);
  border-radius: 999px; padding: .55rem 1rem; font-family: inherit; font-size: .88rem;
}
.social-row { display: flex; gap: .6rem; }
.social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(217,106,127,.4); background: var(--blush);
  font-size: 1.1rem; color: var(--primary-deep); font-weight: 700;
  transition: transform .15s ease;
}
.social-btn:hover { transform: translateY(-2px) scale(1.05); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: .65rem 1.4rem; font-size: .92rem;
  transition: opacity .25s ease, transform .25s ease;
}
.toast-show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Sections ============ */
.comments-section, .about-section, .faq-section, .licensing-section {
  max-width: 960px; margin: 0 auto; padding: 2.2rem 1.25rem 0;
}
.more-games {
  max-width: 1360px; margin: 0 auto; padding: .65rem 1.25rem 0;
}
.section-title {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--primary-deep);
  margin-bottom: .9rem;
}
.section-sub { color: var(--ink-soft); font-size: .92rem; margin-top: -.5rem; margin-bottom: .9rem; }
.comment-count {
  font-family: var(--font-body); font-size: .85rem; background: var(--blush);
  border-radius: 999px; padding: .15rem .7rem; vertical-align: middle; color: var(--primary-deep);
}

/* ---- Comments ---- */
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.6rem; }
.comment { display: flex; gap: .8rem; }
.avatar {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--av, var(--blush)); font-size: 1.2rem;
}
.comment-body {
  background: var(--surface); border: 1px solid rgba(201,162,94,.25);
  border-radius: 14px; border-top-left-radius: 4px; padding: .7rem 1rem; flex: 1;
}
.comment-meta { font-size: .85rem; margin-bottom: .15rem; }
.comment-meta time { color: var(--ink-soft); font-size: .78rem; margin-left: .4rem; }
.comment-image {
  display: block; max-width: min(100%, 520px); max-height: 360px;
  margin-top: .65rem; border-radius: 12px; object-fit: contain;
  border: 1px solid rgba(201,162,94,.3); background: var(--bg);
}

.comment-form {
  background: var(--surface); border: 1px solid rgba(201,162,94,.3);
  border-radius: var(--radius); padding: 1.4rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.form-hint { font-size: .9rem; color: var(--ink-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.comment-form label, .editor-field { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .9rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.comment-form input {
  border: 1px solid rgba(201,162,94,.45); border-radius: 12px;
  padding: .6rem .9rem; font-family: inherit; font-size: .95rem; font-weight: 400;
  background: var(--bg); color: var(--ink);
}
.comment-form input:focus, .rich-editor:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.rich-editor-shell {
  border: 1px solid rgba(201,162,94,.45); border-radius: 14px;
  background: var(--bg); overflow: hidden;
}
.rich-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  padding: .5rem; border-bottom: 1px solid rgba(201,162,94,.28);
  background: rgba(255,255,255,.55);
}
.tool-btn {
  min-height: 34px; border: 1px solid rgba(217,106,127,.45); border-radius: 999px;
  padding: .32rem .78rem; font-weight: 800; font-size: .84rem;
  color: var(--primary-deep); background: var(--surface); cursor: pointer;
}
.tool-btn:hover { background: var(--blush); }
.image-tool { display: inline-flex; align-items: center; }
.image-help { margin-left: auto; color: var(--ink-soft); font-size: .82rem; font-weight: 400; }
.rich-editor {
  min-height: 132px; padding: .75rem .9rem; font-size: .95rem; font-weight: 400;
  color: var(--ink); background: var(--bg); overflow-wrap: anywhere;
}
.rich-editor:empty::before { content: attr(data-placeholder); color: rgba(62,46,53,.55); }
.rich-editor p, .rich-editor div { margin: 0 0 .45rem; }
.rich-editor a, .comment-rich a { color: var(--primary-deep); text-decoration: underline; }
.rich-editor img { display: block; max-width: min(100%, 420px); max-height: 300px; margin: .55rem 0; border-radius: 12px; border: 1px solid rgba(201,162,94,.3); }
.comment-rich { overflow-wrap: anywhere; }
.comment-rich img { display: block; max-width: min(100%, 520px); max-height: 360px; margin-top: .65rem; border-radius: 12px; object-fit: contain; border: 1px solid rgba(201,162,94,.3); background: var(--bg); }
.comment-form .btn { align-self: flex-start; }
.moderation-note { font-size: .8rem; color: var(--ink-soft); }

/* ---- About ---- */
.about-section h3 { font-family: var(--font-display); color: var(--ink); margin: 1.4rem 0 .4rem; }
.about-section p, .about-section li { font-size: .98rem; }
.about-section ol, .about-section ul { padding-left: 1.4rem; display: flex; flex-direction: column; gap: .3rem; margin: .4rem 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.tag {
  background: var(--blush); color: var(--primary-deep);
  border-radius: 999px; padding: .3rem .95rem; font-size: .85rem; font-weight: 700;
}
.tag:hover { background: #F2D3D9; text-decoration: none; }

/* ---- FAQ ---- */
.faq-item {
  background: var(--surface); border: 1px solid rgba(201,162,94,.3);
  border-radius: 14px; margin-bottom: .7rem; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: .95rem 1.2rem;
  font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-indicator { flex: 0 0 auto; width: 12px; height: 12px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(45deg); transition: transform .2s ease; }
.faq-item[open] .faq-indicator { transform: rotate(225deg); }
.faq-item p { padding: 0 1.2rem 1rem; color: var(--ink-soft); }

/* ---- SEO copy, tags & game grid ---- */
.seo-copy {
  margin: 1.2rem 0 1rem; padding: 1rem 1.1rem 1.05rem;
  background: rgba(255,255,255,.5); border: 1px solid rgba(201,162,94,.22);
  border-radius: 18px; color: var(--ink-soft);
}
.seo-kicker {
  margin-bottom: .25rem; font-size: .78rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--primary-deep);
}
.seo-copy h2 {
  margin-bottom: .45rem; font-family: var(--font-display);
  font-size: 1.28rem; line-height: 1.2; color: var(--ink);
}
.seo-copy h3 {
  margin-bottom: .22rem; font-size: .96rem; line-height: 1.25; color: var(--ink);
}
.seo-copy p { font-size: .93rem; line-height: 1.55; }
.seo-copy-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem; margin-top: .85rem;
}
.seo-link-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.seo-link-row a {
  border-radius: 999px; padding: .36rem .78rem;
  background: rgba(246,227,230,.82); color: var(--primary-deep);
  font-size: .84rem; font-weight: 800;
}
.seo-link-row a:hover { background: #F2D3D9; text-decoration: none; }

.popular-tags {
  margin: 1.6rem 0 .4rem; padding: .8rem .9rem .9rem;
  background: rgba(255,255,255,.48); border: 1px solid rgba(201,162,94,.24);
  border-radius: 18px;
}
.popular-tags-title {
  margin-bottom: .58rem; font-size: 1.02rem; line-height: 1.15;
  color: var(--ink); font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .42rem .48rem; }
.chip {
  border: 0; background: #E4E2E2; color: #3E3A41; border-radius: 999px;
  padding: .38rem .92rem; font-weight: 700; font-size: .84rem; line-height: 1;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.chip:hover { background: #DAD5D8; transform: translateY(-1px); }
.chip-active { background: var(--primary); color: #fff; }

.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: .72rem; padding-bottom: 1rem;
}
.game-card {
  background: var(--surface); border: 1px solid rgba(201,162,94,.3);
  border-radius: 16px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.game-card-button {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  border: 0; background: transparent; color: inherit; text-align: left; padding: 0;
}
a.game-card-button:hover { text-decoration: none; }
.card-thumb-wrap {
  position: relative; display: block; width: 100%;
  border: none; background: var(--blush); padding: 0; aspect-ratio: 1 / .86; overflow: hidden;
}
.card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 3rem; }
.card-body { position: relative; padding: .62rem .75rem .72rem; display: block; min-height: 3.2rem; }
.card-body::after {
  content: ""; position: absolute; right: .5rem; top: .42rem;
  width: 28px; height: 20px; opacity: .16; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='24' viewBox='0 0 34 24'%3E%3Cpath d='M25 13c0-6-5-11-11-11C9 2 5 6 5 11c0 4 4 8 9 8 4 0 7-3 7-7 0-3-3-6-6-6-2 0-4 2-4 4' fill='none' stroke='%23E8A8C0' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.card-title {
  position: relative; z-index: 1; display: block;
  font-family: var(--font-display); font-size: .98rem; line-height: 1.22;
  overflow-wrap: anywhere;
}
.no-results { color: var(--ink-soft); padding: 1rem 0; }

/* ---- Static SEO collection pages ---- */
.seo-page .site-header { position: sticky; }
.seo-nav { flex-wrap: wrap; justify-content: flex-end; }
.nav-link-current { color: var(--primary-deep); }
.seo-collection { padding-top: 1.1rem; }
.collection-intro {
  max-width: 76ch; margin-top: .35rem;
  color: var(--ink-soft); font-size: .98rem; line-height: 1.6;
}
.static-games-grid { margin-top: .9rem; }
.collection-faq {
  max-width: none; padding: .8rem 0 0;
}
.collection-faq .section-title { font-size: 1.28rem; }

/* ============ Footer ============ */
.site-footer {
  position: relative; margin-top: 3rem; overflow: hidden;
  background: linear-gradient(180deg, rgba(246,227,230,.5), rgba(246,227,230,.9));
  border-top: 1px solid rgba(201,162,94,.35);
  padding: 3rem 1.25rem 1.5rem;
}
.footer-watermark {
  position: absolute; right: -1rem; bottom: -2.2rem;
  font-family: var(--font-display); font-size: 9rem; font-weight: 700;
  color: rgba(217,106,127,.07); pointer-events: none; user-select: none;
}
.footer-cols {
  max-width: 1100px; margin: 0 auto 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-col h3 { font-family: var(--font-display); color: var(--primary-deep); margin-bottom: .6rem; }
.footer-col p { font-size: .92rem; color: var(--ink-soft); max-width: 40ch; }
.footer-col a { display: block; padding: .15rem 0; font-size: .92rem; }
.footer-bottom { text-align: center; font-size: .82rem; color: var(--ink-soft); }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .play-layout { grid-template-columns: 190px minmax(0, 1fr) 190px; }
}
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 1.3rem; }
  .home-hero h1 { max-width: none; }
  .home-hero-panel { display: none; }
  .play-layout { grid-template-columns: 1fr; }
  .side-rail { position: static; order: 2; }
  .stage-column { order: 1; }
  .rail-list { flex-direction: row; overflow-x: auto; padding-bottom: .4rem; }
  .rail-item { flex: 0 0 200px; }
  .hamburger { display: flex; }
  .seo-nav { display: flex; margin-left: 0; width: 100%; gap: .45rem .8rem; }
  .seo-nav .nav-link { font-size: .92rem; padding: .24rem 0; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--surface); border-bottom: 1px solid rgba(201,162,94,.35);
    padding: .8rem 1.25rem 1.2rem; display: none; box-shadow: var(--shadow);
  }
  .main-nav.nav-open { display: flex; }
  .seo-page .main-nav {
    position: static; display: flex; box-shadow: none; border-bottom: 0;
    padding: 0; background: transparent;
  }
  .dropdown-menu { position: static; box-shadow: none; border: 1px solid rgba(201,162,94,.25); }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown .dropdown-menu.dropdown-open { display: block; }
  .search-box input { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home-hero { padding: 1.15rem 1rem .6rem; }
  .home-hero h1 { font-size: 2.15rem; }
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .category-tile { min-height: 132px; border-radius: 16px; }
  .category-tile-title { font-size: .98rem; }
  .more-games { padding-left: 1rem; padding-right: 1rem; }
  .stage-frame { aspect-ratio: 3 / 4; }
  .game-bar { flex-direction: column; align-items: stretch; }
  .game-bar-actions { justify-content: space-between; }
  .bar-label { font-size: .8rem; }
  .copy-row { flex-direction: column; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: .7rem; }
  .seo-copy-grid { grid-template-columns: 1fr; gap: .65rem; }
  .card-body { min-height: 2.9rem; padding: .52rem .62rem .6rem; }
  .card-title { font-size: .9rem; }
  .modal { padding: 1.4rem; }
}
