/*
 * TUTURIGACHI 2026 / 両生類渉外部
 * Copyright (C) 2026 Tuturigachi Language Solutions Corp. All Rights Reserved.
 * 蛙の遊び場：説明書のカード
 */

.hc {
  --hc-teal: #1d5a66;
  --hc-teal-deep: #133f48;
  --hc-teal-lit: #2c7180;
  --hc-ver: #cf3f2b;
  --hc-cream: #f5f0e3;
  --hc-paper: #fbf8f0;
  --hc-card: #e9e1cb;
  --hc-sage: #3f5a4b;
  --hc-ink: #1e2a2c;
  --hc-mute: #46524f;
  --hc-hair-lit: #fffdf7;
  --hc-hair-dark: #c3b797;
  --hc-shadow: 26, 34, 25;
  --hc-dot: "DotGothic16 Cards", "DotGothic16", monospace;
  --hc-ja: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --hc-en: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
  color: var(--hc-ink);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
.hc *, .hc *::before, .hc *::after { box-sizing: inherit; }
.hc [hidden] { display: none !important; }
.hc :lang(ja) { font-family: var(--hc-ja); line-break: strict; word-break: normal; overflow-wrap: anywhere; }
.hc :lang(en) { font-family: var(--hc-en); }
.hc-btn {
  appearance: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 76px; min-height: 44px; padding: 5px 14px 6px;
  border: 1px solid var(--hc-teal); border-radius: 2px;
  background: var(--hc-cream);
  color: var(--hc-teal-deep);
  box-shadow: inset 1px 1px 0 var(--hc-hair-lit), inset -1px -1px 0 var(--hc-hair-dark);
  font: 600 14px/1.15 var(--hc-en);
  cursor: pointer;
}
.hc-btn [lang="ja"] { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.hc-btn [lang="en"] { font-weight: 600; font-size: 11.5px; letter-spacing: .02em; color: var(--hc-mute); margin-top: 2px; }
.hc-btn:hover { background: #fffaf0; }
.hc-btn:active { box-shadow: inset -1px -1px 0 var(--hc-hair-lit), inset 1px 1px 0 var(--hc-hair-dark); transform: translateY(1px); }
.hc-btn:disabled { cursor: default; color: #7d8584; border-color: #a9b2ae; background: #efeadc; transform: none; }
.hc-btn:disabled [lang="en"] { color: #7d8584; }
.hc-btn.is-default {
  min-width: 88px;
  font: 600 15px/1 var(--hc-en); letter-spacing: .08em;
  border-color: var(--hc-teal-deep);
  box-shadow: 0 0 0 1px var(--hc-teal-deep), inset 1px 1px 0 var(--hc-hair-lit), inset -1px -1px 0 var(--hc-hair-dark);
}
.hc-btn:focus-visible, .hc-close:focus-visible, .hc-body:focus-visible {
  outline: 2px solid var(--hc-ver); outline-offset: 3px;
}
.hc-window {
  position: fixed; z-index: 40;
  display: flex; flex-direction: column;
  width: min(580px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px - var(--frame-h, 0px))); 
  background: var(--hc-paper);
  border: 1px solid var(--hc-teal-deep);
  border-radius: 3px;
  box-shadow:
    inset 1px 1px 0 var(--hc-hair-lit),
    0 2px 3px rgba(var(--hc-shadow), .22),
    0 14px 32px -6px rgba(var(--hc-shadow), .38);
}
.hc-bar {
  flex: none;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 6px 6px 7px;
  background: var(--hc-teal);
  color: var(--hc-cream);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 1px 0 var(--hc-teal-lit);
  border-bottom: 2px solid var(--hc-ver);
}
.hc-icon {
  flex: none; display: grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--hc-cream);
  border-radius: 2px;
  box-shadow: inset -1px -1px 0 var(--hc-hair-dark);
}
.hc-icon img { display: block; width: 18px; height: auto; }
.hc-title {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 1px;
  margin: 0;
  font: 400 16px/1.25 var(--hc-dot);
}
.hc-title [lang="ja"] { font-family: var(--hc-dot); letter-spacing: .03em; }
.hc-title [lang="en"] { font: 600 12.5px/1.3 var(--hc-en); letter-spacing: .02em; color: #dfe9e4; }
.hc-close {
  appearance: none; flex: none; position: relative; align-self: flex-start;
  width: 26px; height: 24px; padding: 0;
  border: 1px solid var(--hc-teal-deep); border-radius: 2px;
  background: var(--hc-cream);
  box-shadow: inset 1px 1px 0 var(--hc-hair-lit), inset -1px -1px 0 var(--hc-hair-dark);
  cursor: pointer;
}
.hc-close::before, .hc-close::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 2px; margin: -1px 0 0 -6px;
  background: var(--hc-teal-deep);
  transform: rotate(45deg);
}
.hc-close::after { transform: rotate(-45deg); }
.hc-close:hover::before, .hc-close:hover::after { background: var(--hc-ver); }
.hc-close:active { box-shadow: inset -1px -1px 0 var(--hc-hair-lit), inset 1px 1px 0 var(--hc-hair-dark); }
.hc-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 24px 4px 22px;
  scrollbar-width: thin; scrollbar-color: var(--hc-teal) var(--hc-card);
}
.hc-lines { list-style: none; margin: 0; padding: 0; }
.hc-lines > li { position: relative; padding-left: 17px; margin: 0 0 13px; }
.hc-lines > li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 6px; height: 6px; background: var(--hc-teal);
}
.hc-lines p { margin: 0; }
.hc-lines [lang="ja"] { font-size: 17px; font-weight: 500; line-height: 1.68; letter-spacing: .01em; color: var(--hc-ink); }
.hc-lines [lang="en"] { font-size: 15px; font-weight: 400; line-height: 1.45; color: var(--hc-mute); margin-top: 2px; }
.hc-foot {
  flex: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 9px 12px 10px 22px;
  background: var(--hc-cream);
  border-top: 1px solid var(--hc-hair-dark);
  box-shadow: inset 0 1px 0 var(--hc-hair-lit);
  border-radius: 0 0 2px 2px;
}
.hc-walk { flex: 1 1 auto; display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 12px; margin: 0; line-height: 1.25; color: var(--hc-mute); }
.hc-walk [lang="en"]:not(.hc-count) { grid-column: 1; }
.hc-walk .hc-count { grid-column: 2; grid-row: 1 / span 2; }
.hc-walk [lang="ja"] { font-size: 13px; font-weight: 500; }
.hc-walk [lang="en"] { font-size: 11.5px; }
.hc-count { font: 600 16px/1.2 var(--hc-en); font-variant-numeric: tabular-nums; color: var(--hc-teal-deep); letter-spacing: .04em; }
.hc-btns { display: flex; gap: 8px; margin-left: auto; }
.hc-window.is-opening { animation: hc-unfold 260ms cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes hc-unfold {
  from { clip-path: inset(0 0 calc(100% - 40px) 0 round 3px); }
  to   { clip-path: inset(0 0 0 0 round 3px); }
}
@media (prefers-reduced-motion: reduce) {
  .hc-window.is-opening { animation: none; }
  .hc-btn:active { transform: none; }
}
@media (max-width: 600px) {
  .hc-window {
    left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + var(--frame-h, 0px)) !important;
    width: auto;
    max-height: min(66dvh, calc(100dvh - 64px - var(--frame-h, 0px)));
  }
  .hc-body { padding: 14px 16px 4px 14px; }
  .hc-lines > li { padding-left: 14px; margin-bottom: 13px; }
  .hc-lines [lang="ja"] { font-size: 16.5px; line-height: 1.7; }
  .hc-lines [lang="en"] { font-size: 14.5px; }
  .hc-foot { padding: 8px 8px 10px 14px; flex-wrap: nowrap; }
  .hc-walk > :not(.hc-count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hc-btns { gap: 6px; }
  .hc-btn { min-width: 64px; padding: 5px 10px 6px; }
  .hc-btn.is-default { min-width: 64px; }
}
