/* しろくろテニス！ — about page. Colours and type follow the game (css/game.css). Light only, like the game. */
:root {
  --ink: #2a1d2e; --pearl: #fff8ee; --onyx: #2b2438; --lagoon: #19b3c8; --felt: #1d7a52; --grass: #3fae5c;
  --mango: #ffb627; --coral: #ff5d8f; --muted: #6d5a72; --sky: #9fdcff; --gold: #e2b23a;
  --ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --disp: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--sky); }
body { margin: 0; color: var(--ink); background: var(--sky); font: 500 16px/1.85 var(--ui); letter-spacing: .02em; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--felt); }
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 32px); } }
p { margin: 0 0 1em; }
h2 { font: 400 clamp(26px, 4.4vw, 40px)/1.3 var(--disp); margin: 0 0 20px; }
h2 .hl { color: var(--felt); }
h3 { font-size: 19px; font-weight: 800; margin: 0 0 6px; line-height: 1.45; }
.kicker { display: inline-block; font: 400 12px/1 var(--disp); letter-spacing: .16em; color: var(--pearl); background: var(--onyx); padding: 7px 12px 6px; border-radius: 99px; margin: 0 0 14px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* buttons: same build as the game (thick ink edge + drop) */
.btn { display: inline-block; font: 800 17px/1.2 var(--ui); color: var(--ink); background: var(--pearl); border: 3px solid var(--ink); border-radius: 16px; padding: 12px 24px; box-shadow: 0 5px 0 var(--ink); text-decoration: none; cursor: pointer; transition: transform .07s, box-shadow .07s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--mango); font-size: 20px; padding: 14px 34px; border-radius: 20px; }
.btn.small { font-size: 14px; padding: 8px 16px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--mango); outline-offset: 3px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* hero: the demo match plays behind */
.hero { position: relative; min-height: min(720px, 92vh); display: grid; align-items: end; overflow: hidden; background: #2f7d46 url(image/about/poster.webp) center/cover; isolation: isolate; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; z-index: -2; }
.hero-video.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(42, 29, 46, .72) 0, rgba(42, 29, 46, .5) 45%, rgba(42, 29, 46, 0) 80%), linear-gradient(180deg, rgba(42, 29, 46, 0) 45%, rgba(42, 29, 46, .6) 100%); }
@media (max-width: 760px) { .hero::after { background: linear-gradient(180deg, rgba(42, 29, 46, .15) 0, rgba(42, 29, 46, .7) 45%, rgba(42, 29, 46, .88) 100%); } }
.hero-in { padding: 120px 0 64px; color: var(--pearl); }
.hero .kicker { background: var(--mango); color: var(--ink); }
.logo { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: .08em; font: 400 clamp(22px, 6.4vw, 62px)/1 var(--disp); }
.logo span { width: 1.34em; height: 1.34em; border-radius: 50%; display: grid; place-items: center; border: .09em solid var(--ink); box-shadow: 0 .1em 0 var(--ink); animation: drop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.logo .w { background: var(--pearl); color: var(--ink); }
.logo .k { background: var(--onyx); color: var(--pearl); }
.logo span:nth-child(2) { animation-delay: .06s } .logo span:nth-child(3) { animation-delay: .12s } .logo span:nth-child(4) { animation-delay: .18s }
.logo span:nth-child(5) { animation-delay: .24s } .logo span:nth-child(6) { animation-delay: .3s } .logo span:nth-child(7) { animation-delay: .36s } .logo span:nth-child(8) { animation-delay: .42s }
@keyframes drop { from { transform: translateY(-40px) rotateY(180deg); opacity: 0; } }
.hero .sub { font-weight: 800; font-size: 16px; margin: 0 0 10px; color: var(--mango); }
.hero .lead { font-size: 17px; max-width: 36em; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.vid-toggle { position: absolute; right: 16px; bottom: 16px; font: 700 12px/1 var(--ui); color: var(--pearl); background: rgba(42, 29, 46, .55); border: 1px solid rgba(255, 248, 238, .5); border-radius: 99px; padding: 8px 12px; cursor: pointer; }

/* sections */
.sec { padding: 80px 0; }
.band { background: var(--pearl); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.card { background: var(--pearl); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 20px 22px; }
.band .card { background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.shot { margin: 0; }
.shot img { border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }
.tilt-r { transform: rotate(1.2deg); } .tilt-l { transform: rotate(-1.2deg); }

/* rule steps: numbers are stones, white then black */
.steps { list-style: none; padding: 0; margin: 28px 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: rgba(255, 248, 238, .75); border: 3px solid var(--ink); border-radius: 22px; padding: 20px 20px 8px; }
.steps b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 400 20px/1 var(--disp); background: var(--pearl); margin-bottom: 12px; }
.steps li:nth-child(2) b { background: var(--onyx); color: var(--pearl); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* try board */
.try { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 32px; align-items: center; background: var(--felt); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); padding: 26px; color: var(--pearl); }
.try h3 { color: var(--mango); }
.try .note { color: #cfe9d8; margin-top: 16px; }
.try-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; background: #f3f7ef; padding: 3px; border-radius: 10px; aspect-ratio: 1; }
.cell { appearance: none; border: 0; padding: 0; margin: 0; background: var(--grass); display: grid; place-items: center; cursor: pointer; aspect-ratio: 1; }
.cell:nth-child(odd) { background: #37a052; }
.cell.gold { background: #d9b24a !important; }
.cell:hover:not(:disabled) { background: #6fcf86; }
.cell:disabled { cursor: default; }
.st { display: inline-block; width: 76%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(42, 29, 46, .5); }
.st.w { background: var(--pearl); } .st.k { background: var(--onyx); }
.st.flip { animation: flip .45s ease both; }
@keyframes flip { 0% { transform: rotateY(0) scale(1.1); } 50% { transform: rotateY(90deg) scale(1.15); } 100% { transform: rotateY(0) scale(1); } }
.try-count { font: 400 22px/1 var(--disp); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.try-count .st { width: 22px; border-width: 2px; }
.try-count #tryMsg { font: 800 14px/1.4 var(--ui); color: var(--mango); }
@media (max-width: 760px) { .try { grid-template-columns: 1fr; padding: 18px; } .try-board-wrap { max-width: 360px; margin: 0 auto; width: 100%; } }

/* match facts */
.board-facts { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.board-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 18px; }
.board-facts dt { font-weight: 800; padding: 12px 0; border-bottom: 2px dashed #d9cbbf; white-space: nowrap; }
.board-facts dd { margin: 0; padding: 12px 0; border-bottom: 2px dashed #d9cbbf; }
@media (max-width: 860px) { .board-facts { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .board-facts dl { grid-template-columns: 1fr; } .board-facts dt { border: 0; padding-bottom: 0; } }

/* controls */
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; }
@media (max-width: 860px) { .controls { grid-template-columns: 1fr; } }
.keys { width: 100%; border-collapse: collapse; font-size: 15px; }
.keys th { text-align: left; white-space: nowrap; vertical-align: top; padding: 9px 14px 9px 0; color: var(--felt); }
.keys td { padding: 9px 0; border-bottom: 2px dashed #e3d6ca; }
kbd { display: inline-block; min-width: 26px; padding: 1px 7px; margin: 0 2px 2px 0; text-align: center; font: 800 13px/1.6 var(--ui); background: #fff; border: 2px solid var(--ink); border-radius: 7px; box-shadow: 0 2px 0 var(--ink); }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 6px 14px; font-size: 14px; }
.chips b { font: 400 14px var(--disp); margin-right: 8px; color: var(--coral); }

/* characters */
.chars { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 28px 0 18px; }
@media (max-width: 900px) { .chars { grid-template-columns: 1fr; } }
.char { display: grid; grid-template-columns: 170px 1fr; gap: 20px; background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 6px 0 var(--ink); padding: 20px; }
.char-pic img { border-radius: 50%; border: 3px solid var(--ink); background: var(--grass); }
.char .en { font: 400 12px/1 var(--disp); letter-spacing: .08em; color: var(--muted); margin: 4px 0 6px; }
.char h3 { font: 400 26px/1.2 var(--disp); margin-bottom: 10px; }
.char h3 small { font: 800 13px var(--ui); color: var(--muted); margin-left: 6px; }
.prof { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; line-height: 1.6; }
.prof dt { font-weight: 800; color: var(--felt); }
.prof dd { margin: 0; }
.stats { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr; gap: 3px; font-size: 13px; font-weight: 800; max-width: 240px; }
.stats li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats i { flex: none; width: 120px; height: 10px; border-radius: 6px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--mango) calc(var(--v) * 20%), #eee4d8 0); }
.sp { background: var(--onyx); color: var(--pearl); border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.65; }
.sp span { font: 400 12px/1 var(--disp); background: var(--mango); color: var(--ink); border-radius: 99px; padding: 4px 8px 3px; margin-right: 8px; }
.sp h4 { display: inline; font: 400 17px var(--disp); }
.sp p { margin: 6px 0 0; }
@media (max-width: 520px) { .char { grid-template-columns: 1fr; } .char-pic { width: 150px; margin: 0 auto; } }

/* gauge + mode tables */
.gauge { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; }
.gauge th, .gauge td { border-bottom: 2px dashed #e3d6ca; padding: 8px 6px; text-align: left; }
.gauge th { white-space: nowrap; color: var(--felt); }
.lvls { margin: 4px 0 12px; }
.lvls div { padding: 8px 0; border-bottom: 2px dashed #e3d6ca; }
.lvls dt { font-weight: 800; color: var(--felt); font-size: 14px; }
.lvls dd { margin: 0; font-size: 14px; }

/* tips + faq */
.tips { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tips li { position: relative; padding: 16px 0 16px 50px; border-bottom: 2px dashed rgba(42, 29, 46, .25); }
.tips li::before { counter-increment: t; content: counter(t); position: absolute; left: 0; top: 14px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font: 400 15px/1 var(--disp); background: var(--pearl); }
.tips li:nth-child(even)::before { background: var(--onyx); color: var(--pearl); }
.tips b { display: block; font-size: 17px; }
.faq dt { font-weight: 800; margin-top: 20px; font-size: 17px; }
.faq dd { margin: 4px 0 0; }

/* final + footer */
.final { text-align: center; padding: 90px 0 76px; }
.final .cta-row { justify-content: center; }
.games-nav { margin-top: 26px; font-size: 14px; }
footer { background: var(--ink); color: #d9cbd8; padding: 26px 0 40px; font-size: 13px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: #d9cbd8; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .logo span, .st.flip { animation: none; } .btn:hover { transform: none; } }

/* headings break between phrases only (<wbr> marks the phrase ends) */
h1, h2, h3, h4, .sub, .tag, .news-title, .final-word { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 480px) { .keys, .keys tbody, .keys tr, .keys th, .keys td { display: block; } .keys th { padding: 10px 0 2px; } .keys td { padding: 0 0 10px; } }
