:root {
  color-scheme: light;
  --ink: #2e3131;
  --muted: #6e7473;
  --mint: #62ad98;
  --mint-dark: #347a68;
  --mint-soft: #e9f6f1;
  --coral: #e68b78;
  --amber: #e8b94f;
  --line: #e4e9df;
  --surface: #ffffff;
  --page: #fffefd;
  --cf-green: var(--mint-dark);
  --cf-muted: var(--muted);
  --cf-line: var(--line);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--mint-dark); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p, dl, dd { overflow-wrap: anywhere; }

.site-header, .site-footer, .game-page {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}

.site-brand { color: var(--mint-dark); font-size: 13px; font-weight: 800; }
.site-nav, .site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}
.game-page { margin-bottom: 64px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 0 38px;
  border-top: 1px solid #eef0ec;
  color: var(--muted);
  font-size: 14px;
}
.footer-brand { color: var(--ink); font-weight: 700; }

.cube-page *, .cube-page *::before, .cube-page *::after { box-sizing: border-box; }
.cube-page [hidden] { display: none !important; }
.game-page .cf-description-content a { text-underline-offset: .22em; }
.cube-page button:focus-visible, .cube-page summary:focus-visible { outline: 3px solid #b27223; outline-offset: 4px; }
.cube-page .cf-skip { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 10px 20px; background: white; }
.cube-page .cf-skip:focus { top: 10px; }
.cube-page .cf-intro { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: center; gap: 40px; padding: 62px 0 52px; }
.cube-page .cf-eyebrow { margin: 0 0 12px; color: var(--cf-green); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.cube-page h1 { margin: 0 0 24px; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.4; letter-spacing: .02em; }
.cube-page .cf-lead { margin: 0; color: var(--cf-muted); line-height: 2; }
.cube-page .cf-card-art { display: flex; height: 220px; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(ellipse, #eaf5ef 45%, transparent 70%); }
.cube-page .cf-card-art span { display: grid; width: 86px; height: 122px; place-items: center; margin: 0 -13px; border: 2px solid #8ab8a8; border-radius: 7px; background: var(--page); color: #28584c; font-family: Georgia, serif; font-size: 44px; box-shadow: 0 8px 18px #294f3d14; transform: rotate(-16deg) translateY(8px); }
.cube-page .cf-card-art span:nth-child(2) { z-index: 1; color: #c66a57; transform: translateY(-8px); }
.cube-page .cf-card-art span:nth-child(3) { transform: rotate(16deg) translateY(8px); }
.cube-page .cf-game-shell { padding: 22px 24px 20px; border: 1px solid var(--cf-line); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 32px #36544208; }
.cube-page .cf-game-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cube-page .cf-game-heading h2 { margin: 0; color: var(--cf-green); font-size: 12px; letter-spacing: .1em; }
.cube-page .cf-game-heading h2 span { margin-left: 14px; color: #424b48; font-size: 15px; letter-spacing: 0; }
.cube-page .cf-badge { color: var(--cf-muted); font-size: 12px; }
.cube-page .cf-player { overflow: hidden; border-radius: 6px; background: #0e1c29; }
.cube-page .cf-player-bar { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; background: #f3f7f2; color: #52665e; }
.cube-page .cf-player-bar p { margin: 0; font-size: 13px; line-height: 1.5; }
.cube-page .cf-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 8px 19px; border: 1px solid #b8ddd2; border-radius: 8px; background: var(--surface); color: var(--cf-green); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; cursor: pointer; }
.cube-page .cf-button:hover { background: #edf7f2; color: #235a4b; }
.cube-page .cf-button:disabled { opacity: .5; cursor: default; }
.cube-page .cf-primary { border-color: var(--cf-green); background: var(--cf-green); color: #fff; }
.cube-page .cf-primary:hover { background: #286350; color: #fff; }
.cube-page .cf-fullscreen { flex: 0 0 auto; min-height: 40px; padding: 7px 13px; white-space: nowrap; }
.cube-page .cf-display { position: relative; width: 100%; aspect-ratio: 8 / 5; }
.cube-page .cf-display iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.cube-page .cf-load-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; color: #e6f2ed; text-align: center; }
.cube-page .cf-load-panel p { margin: 0; font-size: 26px; font-weight: 700; }
.cube-page .cf-load-panel .cf-load-label { color: #a5c3b9; font-size: 12px; letter-spacing: .2em; }
.cube-page .cf-load-panel span { color: #b9ccc5; font-size: 13px; }
.cube-page .cf-load-note, .cube-page .cf-controls { margin: 16px 0 0; color: var(--cf-muted); font-size: 14px; line-height: 1.8; }
.cube-page .cf-controls summary { width: fit-content; min-height: 44px; padding: 8px 0; color: var(--cf-green); cursor: pointer; }
.cube-page .cf-controls p { margin: 0 0 8px; }
.cube-page .cf-noscript { padding: 12px; border: 1px solid #bd6251; }
.cube-page .cf-game-description { margin-top: 42px; padding: 30px 32px; border: 1px solid var(--cf-line); border-radius: 8px; background: var(--surface); }
.cube-page .cf-game-description h2 { margin: 0 0 20px; font-size: 25px; line-height: 1.5; }
.cube-page .cf-description-content { max-width: 800px; color: #606b65; overflow-wrap: anywhere; }
.cube-page .cf-description-content h3 { margin: 26px 0 10px; color: #344b40; font-size: 19px; }
.cube-page .cf-description-content p { margin: 0 0 12px; }
.cube-page .cf-description-content :last-child { margin-bottom: 0; }
.cube-page .cf-more { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 42px 0; }
.cube-page .cf-more h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.6; }
.cube-page .cf-more p:not(.cf-eyebrow) { margin: 0; color: var(--cf-muted); font-size: 14px; }
.cube-page .cf-more .cf-button { flex: 0 0 auto; }
.game-comment-section { padding: 44px 0 10px; }
.game-comment-note, .app-comment-note { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.app-comment-note { margin-top: -10px; }
.app-comments, .app-comment-form { margin: 1rem auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.app-comments h2 { margin: 0 0 1rem; font-size: 26px; line-height: 1.35; }
.app-comments-empty { margin: 0; color: var(--muted); }
.app-comment-form { display: grid; gap: 0.85rem; }
.app-comment-form fieldset { display: grid; gap: 0.85rem; margin: 0; padding: 0; border: 0; }
.app-comment-form label { display: grid; gap: 0.35rem; }
.app-comment-form input, .app-comment-form select, .app-comment-form textarea { width: 100%; padding: 0.55rem 0.65rem; border: 1px solid #d5ded9; border-radius: 5px; background: #fff; }
.app-comment-form textarea { min-height: 8rem; }
.cube-page .cf-player:fullscreen, .cube-page .cf-player.cf-expanded { display: grid; width: 100%; height: 100dvh; grid-template-rows: auto minmax(0, 1fr); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-radius: 0; }
.cube-page .cf-player:fullscreen .cf-display, .cube-page .cf-player.cf-expanded .cf-display { min-height: 0; height: 100%; aspect-ratio: auto; }
.cube-page .cf-player.cf-expanded { position: fixed; inset: 0; z-index: 100; }
body.cube-page.cf-no-scroll { overflow: hidden; }

@media (max-width: 820px) {
  .site-header, .site-footer, .game-page { width: min(100% - 32px, 1120px); }
  .site-footer { align-items: flex-start; }
}

@media (max-width: 760px) {
  .cube-page .cf-intro { grid-template-columns: minmax(0, 1fr) 170px; gap: 12px; padding: 38px 0; }
  .cube-page .cf-card-art { height: 170px; }
  .cube-page .cf-card-art span { width: 62px; height: 90px; margin: 0 -11px; font-size: 34px; }
  .cube-page .cf-game-shell { padding: 14px 8px; }
  .cube-page .cf-game-heading { padding-inline: 4px; }
  .cube-page .cf-display { height: max(360px, 62.5vw); aspect-ratio: auto; }
  .cube-page .cf-player-bar { padding-inline: 8px; }
  .cube-page .cf-more { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .site-header { align-items: flex-start; padding: 17px 0; }
  .site-nav { gap: 14px; font-size: 12px; }
  .cube-page .cf-intro { grid-template-columns: 1fr; padding: 30px 0; }
  .cube-page h1 { margin-bottom: 18px; }
  .cube-page .cf-lead { font-size: 15px; }
  .cube-page .cf-card-art { display: none; }
  .cube-page .cf-game-shell { padding: 12px 0; }
  .cube-page .cf-game-heading, .cube-page .cf-load-note, .cube-page .cf-controls { margin-inline: 12px; }
  .cube-page .cf-player { border-radius: 0; }
  .cube-page .cf-player-bar p { font-size: 12px; }
  .cube-page .cf-fullscreen { padding-inline: 10px; font-size: 12px; }
  .cube-page .cf-display { height: clamp(560px, calc(100svh - 76px), 720px); }
  .cube-page .cf-game-description { margin-top: 30px; padding: 24px 20px; }
  .site-footer, .site-footer nav { flex-direction: column; gap: 10px; }
  .site-footer nav { align-items: flex-start; }
}

@media (max-width: 540px) {
  .site-nav { gap: 16px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .cube-page .cf-display { height: max(360px, calc(100svh - 60px)); aspect-ratio: auto; }
  .cube-page .cf-intro { padding: 24px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .cube-page .cf-button { transition: background-color .15s ease; }
}

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