:root {
  color-scheme: light;
  --hy-bg: #f5fbff;
  --hy-panel: rgba(255, 255, 255, 0.94);
  --hy-text: #203040;
  --hy-muted: #6b7c8f;
  --hy-line: #d9edf7;
  --hy-primary: #23a8c7;
  --hy-primary-dark: #137f98;
  --hy-soft: #e8f8fb;
  --hy-pink: #ffeaf2;
  --hy-danger: #b42318;
  --hy-success: #087443;
  --hy-warning: #9a5b00;
  --hy-shadow: 0 18px 48px rgba(36, 122, 150, 0.16);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--hy-text);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 224, 236, 0.85), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(203, 244, 248, 0.95), transparent 30%),
    linear-gradient(180deg, var(--hy-bg), #ffffff 70%);
  line-height: 1.7;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.hy-typing-app {
  width: min(1040px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hy-hero, .hy-panel {
  background: var(--hy-panel);
  border: 1px solid var(--hy-line);
  border-radius: 24px;
  box-shadow: var(--hy-shadow);
  padding: 22px;
  margin: 16px 0;
}

.hy-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 7vw, 4rem);
  letter-spacing: 0.04em;
}

.hy-eyebrow {
  margin: 0;
  color: var(--hy-primary-dark);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hy-lead, .hy-note, .hy-small { color: var(--hy-muted); }
.hy-small { display: block; font-size: 0.86rem; margin-top: 6px; }

.hy-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--hy-soft);
  border: 1px solid var(--hy-line);
  font-weight: 800;
}
.hy-status.is-ok { color: var(--hy-success); }
.hy-status.is-error { color: var(--hy-danger); background: #fff0ee; }
.hy-status.is-warning { color: var(--hy-warning); background: #fff7e6; }

.hy-grid, .hy-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.hy-card, .hy-setting-card {
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--hy-line);
}
.hy-card-label {
  display: block;
  font-size: 0.82rem;
  color: var(--hy-muted);
}
.hy-card-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
}
.hy-select {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--hy-line);
  background: #fff;
}
.hy-ranking-class {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7e6;
  border: 1px solid #f7d38a;
  font-weight: 800;
}

.hy-stage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.hy-stage-button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--hy-line);
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  min-height: 122px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hy-stage-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(36, 122, 150, 0.16);
}
.hy-stage-title { display: block; font-weight: 900; }
.hy-stage-meta { display: block; color: var(--hy-muted); font-size: 0.9rem; margin-top: 4px; }
.hy-stage-hint { display: block; color: var(--hy-primary-dark); font-size: 0.86rem; margin-top: 8px; }

.hy-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hy-primary-button, .hy-secondary-button, .hy-danger-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
}
.hy-primary-button { color: #fff; background: var(--hy-primary); }
.hy-primary-button:hover { background: var(--hy-primary-dark); }
.hy-secondary-button { color: var(--hy-primary-dark); background: var(--hy-soft); border: 1px solid var(--hy-line); }
.hy-danger-button { color: #fff; background: var(--hy-danger); }

.hy-play-area {
  min-height: 240px;
  border: 1px dashed var(--hy-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}
.hy-target-jp {
  font-size: 1.18rem;
  font-weight: 900;
  margin-bottom: 8px;
}
.hy-target-reading {
  color: var(--hy-muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.hy-target-romaji {
  margin-top: 8px;
  color: var(--hy-primary-dark);
  font-weight: 900;
  letter-spacing: 0.04em;
  word-break: break-word;
  line-height: 2.1;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
}
.hy-char {
  display: inline-block;
  min-width: 0.58em;
  padding: 0 1px;
  border-radius: 5px;
}
.hy-char.is-done { color: #9aa7b4; background: #f3fbff; }
.hy-char.is-gap { min-width: 0.72em; background: transparent; }
.hy-char.is-current { color: #fff; background: var(--hy-primary); }
.hy-char.is-miss { color: #fff; background: var(--hy-danger); animation: hy-shake 0.18s linear 1; }
@keyframes hy-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
.hy-typing-input {
  width: 100%;
  margin-top: 14px;
  border: 2px solid var(--hy-line);
  border-radius: 16px;
  padding: 14px;
  font-size: 1.08rem;
  background: #fff;
}
.hy-typing-input:focus {
  outline: 3px solid rgba(35, 168, 199, 0.2);
  border-color: var(--hy-primary);
}
.hy-input-guide {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--hy-pink);
  color: #81405a;
  font-weight: 800;
}
.hy-meter {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.hy-meter span {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--hy-line);
  border-radius: 14px;
  font-weight: 800;
}
.hy-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hy-result {
  padding: 14px;
  border-radius: 18px;
  background: var(--hy-soft);
  border: 1px solid var(--hy-line);
}
.hy-result strong { font-size: 1.25rem; }
.hy-result-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.hy-result-grid div {
  background: #fff;
  border: 1px solid var(--hy-line);
  border-radius: 14px;
  padding: 10px;
}

.hy-debug-wrap { margin-top: 12px; }
pre {
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #10212a;
  color: #d7f9ff;
  border-radius: 16px;
  padding: 14px;
  max-height: 360px;
}

.hy-ranking-area ol { padding-left: 1.4rem; }
.hy-ranking-area li { padding: 6px 0; }
.hy-no-copy {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}
.hy-no-copy::selection { background: transparent; }
.hy-debug-plan-switch { margin: 0 0 14px; }
.hy-debug-plan-box {
  padding: 12px;
  border: 1px solid #f4d06f;
  background: #fff8db;
  border-radius: 16px;
}
.hy-debug-plan-select {
  width: 100%;
  max-width: 360px;
  margin: 8px 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid #e0b948;
  background: #fff;
}

@media (max-width: 640px) {
  .hy-typing-app { width: min(100% - 16px, 1040px); padding-top: 12px; }
  .hy-hero, .hy-panel { padding: 16px; border-radius: 20px; }
  .hy-stage-button { min-height: 104px; }
}


/* v0.2.1 result readability */
.hy-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hy-result-kicker {
  display: block;
  color: var(--hy-primary-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}
.hy-result-message {
  margin: 10px 0 0;
  color: var(--hy-muted);
  font-weight: 700;
}
.hy-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}
.hy-status-badge.is-good { color: var(--hy-success); background: #daf5e8; }
.hy-status-badge.is-warning { color: var(--hy-warning); background: #fff3cf; }
.hy-status-badge.is-danger { color: var(--hy-danger); background: #ffe5e1; }
.hy-status-badge.is-muted { color: var(--hy-muted); background: #eef6fa; }
.hy-result-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hy-result-card span {
  display: block;
  color: var(--hy-muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.hy-result-card strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.hy-result-card.is-good strong { color: var(--hy-success); }
.hy-result-card.is-muted strong { color: var(--hy-muted); }
.hy-result-card.is-warning strong { color: var(--hy-warning); }

.hy-result-advice {
  margin-top: 16px;
  border: 1px solid var(--hy-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
}
.hy-result-advice strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.hy-result-advice p {
  margin: 0;
  color: var(--hy-muted);
  line-height: 1.8;
  font-weight: 800;
}
.hy-result-advice.is-excellent {
  background: linear-gradient(135deg, rgba(255, 251, 232, 0.95), rgba(232, 252, 255, 0.95));
  border-color: rgba(255, 196, 87, 0.55);
}
.hy-result-card.is-excellent strong { color: #b76f00; }
.hy-result-technical {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--hy-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
}
.hy-result-technical summary {
  cursor: pointer;
  color: var(--hy-primary-dark);
  font-weight: 900;
}
.hy-result-grid.is-technical {
  margin-top: 10px;
}


/* v0.2.2 product-grade layout foundation */
:root {
  --hy-ink: #17263a;
  --hy-gold: #f4c95d;
  --hy-stage: #fffdf8;
  --hy-panel: rgba(255, 255, 255, 0.975);
  --hy-shadow: 0 24px 70px rgba(42, 108, 135, 0.18);
}
body {
  background:
    radial-gradient(circle at 5% 4%, rgba(255, 218, 235, 0.95), transparent 32%),
    radial-gradient(circle at 96% 0%, rgba(180, 245, 250, 0.95), transparent 34%),
    linear-gradient(135deg, #fff8fc 0%, #effcff 43%, #ffffff 100%);
}
.hy-typing-app {
  width: min(1180px, calc(100% - 28px));
  padding-top: 18px;
}
.hy-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: clamp(26px, 5vw, 54px);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248, 255, 255, 0.94)),
    radial-gradient(circle at 82% 28%, rgba(35,168,199,0.18), transparent 35%);
}
.hy-hero::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--hy-primary), #ff9dc2, var(--hy-gold));
}
.hy-hero::after {
  content: "TYPE";
  position: absolute;
  right: clamp(18px, 5vw, 62px);
  bottom: -26px;
  color: rgba(35, 168, 199, 0.07);
  font-size: clamp(5rem, 13vw, 11rem);
  font-weight: 1000;
  letter-spacing: -0.06em;
  pointer-events: none;
}
.hy-eyebrow {
  color: var(--hy-primary-dark);
  font-size: 0.86rem;
  letter-spacing: 0.18em;
}
.hy-hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--hy-ink);
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.hy-lead {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  font-weight: 700;
}
.hy-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}
.hy-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hy-hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--hy-primary-dark);
  background: rgba(232,248,251,0.95);
  border: 1px solid var(--hy-line);
  font-weight: 900;
  font-size: 0.82rem;
}
.hy-panel {
  border-radius: 30px;
  padding: clamp(22px, 4vw, 34px);
  border-color: rgba(170, 225, 237, 0.88);
}
.hy-panel h2 {
  margin-top: 0;
  color: var(--hy-ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0.02em;
}
.hy-status {
  margin-top: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  border-radius: 18px;
}
.hy-grid, .hy-settings-grid {
  gap: 14px;
}
.hy-card, .hy-setting-card {
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(36,122,150,0.06);
}
.hy-card-value {
  margin-top: 4px;
  color: var(--hy-ink);
  font-size: 1.18rem;
}
.hy-debug-plan-box {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #fff8db, #fffdf2);
}
.hy-debug-wrap {
  color: var(--hy-muted);
}
.hy-debug-wrap summary {
  cursor: pointer;
  font-weight: 800;
}
.hy-ranking-class {
  border-radius: 20px;
  background: linear-gradient(135deg, #fff8db, #fffdf4);
}
.hy-stage-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.hy-stage-button {
  position: relative;
  overflow: hidden;
  min-height: 162px;
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, var(--hy-stage));
  box-shadow: 0 12px 30px rgba(36,122,150,0.08);
}
.hy-stage-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--hy-primary), #ffacd0, var(--hy-gold));
  opacity: 0.92;
}
.hy-stage-button:disabled {
  filter: grayscale(0.2);
  background: #f7fbfd;
}
.hy-stage-title {
  color: var(--hy-ink);
  font-size: 1.05rem;
}
.hy-stage-meta {
  line-height: 1.55;
}
.hy-stage-hint {
  margin-top: 12px;
  font-weight: 800;
}
.hy-play-panel {
  scroll-margin-top: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,253,255,0.98));
}
.hy-play-area {
  min-height: 360px;
  border-radius: 28px;
  border-style: solid;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(238,250,253,0.62));
}
.hy-preparing {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--hy-primary-dark);
  font-weight: 900;
}
.hy-play-card {
  padding: clamp(16px, 3vw, 26px);
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--hy-line);
  box-shadow: 0 18px 44px rgba(36,122,150,0.1);
}
.hy-play-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--hy-primary-dark);
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hy-target-jp {
  font-size: clamp(1.35rem, 3.6vw, 2.05rem);
  line-height: 1.55;
  color: var(--hy-ink);
}
.hy-target-reading {
  font-size: 1rem;
  margin-top: 8px;
}
.hy-target-romaji {
  padding: 18px 16px;
  border-radius: 20px;
  background: #f6fcff;
  border: 1px solid var(--hy-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hy-char.is-current {
  box-shadow: 0 8px 18px rgba(35,168,199,0.22);
}
.hy-typing-input {
  border-radius: 22px;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 800;
}
.hy-meter {
  gap: 10px;
}
.hy-meter span {
  border-radius: 18px;
  background: #ffffff;
}
.hy-result {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 28px;
  background: linear-gradient(135deg, #e8f8fb, #fffaf2);
}
.hy-result-head strong {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--hy-ink);
}
.hy-result-grid {
  gap: 12px;
}
.hy-result-card {
  border-radius: 20px !important;
  padding: 14px !important;
}
.hy-action-row button {
  min-height: 46px;
}
.hy-ranking-area {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--hy-line);
}
@media (max-width: 720px) {
  .hy-hero-layout { grid-template-columns: 1fr; }
  .hy-hero-badges { justify-content: flex-start; }
  .hy-stage-list { grid-template-columns: 1fr; }
  .hy-play-area { min-height: 300px; padding: 14px; }
}


/* v0.2.3 play experience: countdown, time bar, feedback animation */
.hy-countdown-card {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #e8f8fb);
  border: 1px solid var(--hy-line);
  box-shadow: 0 18px 44px rgba(36,122,150,0.1);
  padding: 28px;
}
.hy-countdown-label {
  color: var(--hy-primary-dark);
  font-size: 0.86rem;
  font-weight: 1000;
  letter-spacing: 0.22em;
}
.hy-countdown-card strong {
  display: block;
  margin: 8px 0;
  color: var(--hy-ink);
  font-size: clamp(4rem, 13vw, 8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.hy-timebar {
  overflow: hidden;
  height: 12px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: #edf7fb;
  border: 1px solid var(--hy-line);
}
.hy-timebar-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hy-primary), #81d8e9);
  transition: background 0.12s ease;
  will-change: width;
}
.hy-timebar-fill.is-warning {
  background: linear-gradient(90deg, #f4c95d, #ffda85);
}
.hy-timebar-fill.is-danger {
  background: linear-gradient(90deg, #d92d20, #ff8a7d);
}
.hy-play-card.hy-play-ok {
  animation: hy-ok-pulse 0.18s ease-out 1;
}
.hy-play-card.hy-play-miss {
  animation: hy-miss-pulse 0.22s ease-out 1;
}
@keyframes hy-ok-pulse {
  0% { box-shadow: 0 18px 44px rgba(36,122,150,0.1); }
  50% { box-shadow: 0 18px 52px rgba(8,116,67,0.22); transform: translateY(-1px); }
  100% { box-shadow: 0 18px 44px rgba(36,122,150,0.1); transform: translateY(0); }
}
@keyframes hy-miss-pulse {
  0% { box-shadow: 0 18px 44px rgba(36,122,150,0.1); }
  35% { box-shadow: 0 18px 52px rgba(180,35,24,0.28); transform: translateX(-2px); }
  70% { transform: translateX(2px); }
  100% { box-shadow: 0 18px 44px rgba(36,122,150,0.1); transform: translateX(0); }
}
#feedbackMeter {
  color: var(--hy-primary-dark);
}


/* v0.2.4 result/timer polish */
.hy-timebar-fill[aria-valuenow] {
  min-width: 0;
}
#timeMeter.is-warning {
  color: var(--hy-warning);
  background: #fff7e6;
  border-color: #f7d38a;
}
#timeMeter.is-danger {
  color: var(--hy-danger);
  background: #fff0ee;
  border-color: #ffc8c0;
}
.hy-result-card.is-warning strong { color: var(--hy-warning); }
.hy-result-card.is-danger strong { color: var(--hy-danger); }


/* v0.2.7 chapter filter and menu polish */
.hy-chapter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}
.hy-chapter-tab {
  border: 1px solid var(--hy-line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--hy-ink);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.hy-chapter-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(36,122,150,0.12);
}
.hy-chapter-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--hy-primary), var(--hy-primary-dark));
  border-color: transparent;
}
.hy-chapter-tab-meta {
  font-size: 0.78rem;
  opacity: 0.78;
}
.hy-stage-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--hy-primary-dark);
  background: var(--hy-soft);
  border: 1px solid var(--hy-line);
  font-size: 0.74rem;
  font-weight: 1000;
}
.hy-empty-stage {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed var(--hy-line);
  color: var(--hy-muted);
  font-weight: 800;
}
@media (max-width: 640px) {
  .hy-chapter-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hy-chapter-tab {
    justify-content: space-between;
    border-radius: 18px;
  }
}


.hy-play-panel {
  scroll-margin-top: 18px;
}

.hy-preparing.is-active {
  display: grid;
  gap: 10px;
  padding: 26px;
  border: 1px solid rgba(30, 168, 196, 0.22);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(230, 249, 252, 0.95), rgba(255, 253, 246, 0.95));
  box-shadow: 0 18px 44px rgba(11, 82, 104, 0.08);
}

.hy-preparing-kicker {
  color: #007c9d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hy-preparing.is-active strong {
  color: #122238;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}


/* v0.3.0 ranking board polish */
.hy-section-kicker {
  margin: 0 0 3px;
  color: var(--hy-primary-dark);
  font-weight: 900;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}
.hy-ranking-controls {
  margin: 16px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 14px;
  align-items: end;
}
.hy-ranking-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hy-ranking-tab {
  border: 1px solid var(--hy-line);
  background: #fff;
  color: var(--hy-primary-dark);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
}
.hy-ranking-tab.is-active {
  background: var(--hy-primary);
  color: #fff;
  border-color: var(--hy-primary);
  box-shadow: 0 10px 22px rgba(35, 168, 199, 0.22);
}
.hy-ranking-stage-filter span {
  display: block;
  color: var(--hy-muted);
  font-size: 0.82rem;
  font-weight: 900;
}
.hy-ranking-area {
  min-height: 118px;
}
.hy-ranking-loading,
.hy-ranking-empty {
  padding: 18px;
  border: 1px dashed var(--hy-line);
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  color: var(--hy-muted);
  font-weight: 800;
}
.hy-ranking-empty strong { color: var(--hy-ink); }
.hy-ranking-empty p { margin: 6px 0 0; }
.hy-ranking-empty.is-error { color: var(--hy-danger); background: #fff0ee; }
.hy-ranking-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.hy-ranking-summary div {
  border: 1px solid var(--hy-line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}
.hy-ranking-summary span {
  display: block;
  color: var(--hy-muted);
  font-size: 0.8rem;
  font-weight: 900;
}
.hy-ranking-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--hy-ink);
  font-size: 1.05rem;
}
.hy-ranking-list {
  display: grid;
  gap: 10px;
}
.hy-ranking-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--hy-line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245,252,255,0.92));
}
.hy-ranking-rank {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--hy-primary);
  font-weight: 1000;
}
.hy-ranking-player strong {
  display: block;
  color: var(--hy-ink);
  font-size: 1rem;
}
.hy-ranking-player span {
  display: block;
  color: var(--hy-muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}
.hy-ranking-score {
  color: var(--hy-ink);
  font-size: 1.2rem;
  font-weight: 1000;
  white-space: nowrap;
}
.hy-ranking-badge {
  color: var(--hy-primary-dark);
  background: var(--hy-soft);
  border: 1px solid var(--hy-line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .hy-ranking-controls { grid-template-columns: 1fr; }
  .hy-ranking-item { grid-template-columns: 42px minmax(0, 1fr); }
  .hy-ranking-score, .hy-ranking-badge { grid-column: 2; justify-self: start; }
}



.hy-stage-best {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 247, 222, 0.92);
  color: #9b6400;
  border: 1px solid rgba(255, 205, 111, 0.62);
  font-size: 0.82rem;
  font-weight: 900;
}
.hy-local-best-note {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hy-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--hy-muted);
}
.hy-local-best-note strong {
  display: block;
  color: var(--hy-ink);
  margin-bottom: 4px;
}
.hy-local-best-note p {
  margin: 0;
  font-weight: 800;
}
.hy-local-best-note.is-updated {
  border-color: rgba(35, 168, 199, 0.5);
  background: linear-gradient(135deg, rgba(230, 250, 255, 0.96), rgba(255, 249, 235, 0.9));
}
.hy-result-card.is-excellent strong {
  color: #007a8f;
}

.hy-training-panel {
  scroll-margin-top: 24px;
}

@media (max-width: 640px) {
  .hy-training-panel {
    scroll-margin-top: 12px;
  }
}

.hy-input-guide strong {
  color: #075f75;
}

.hy-input-guard-notice {
  display: inline-block;
  margin-left: 0.35rem;
  color: #b42318;
  font-weight: 700;
}


/* v0.3.4 next-stage navigation and weak-key summary */
.hy-weak-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(244, 201, 93, 0.58);
  background: linear-gradient(135deg, rgba(255, 248, 219, 0.92), rgba(255, 255, 255, 0.86));
}
.hy-weak-panel.is-good {
  border-color: rgba(8, 116, 67, 0.22);
  background: linear-gradient(135deg, rgba(225, 249, 238, 0.9), rgba(255, 255, 255, 0.86));
}
.hy-weak-panel strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.hy-weak-panel p {
  margin: 0 0 10px;
  color: var(--hy-muted);
  font-weight: 800;
}
.hy-weak-key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hy-weak-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hy-line);
  box-shadow: 0 6px 18px rgba(36, 122, 150, 0.08);
}
.hy-weak-key b {
  min-width: 1.4em;
  text-align: center;
  color: var(--hy-primary-dark);
  font-size: 1.08rem;
}
.hy-weak-key small {
  color: var(--hy-muted);
  font-weight: 900;
}
.hy-action-row button:disabled {
  opacity: 0.46;
  filter: grayscale(0.15);
}

/* v0.3.7 Romaji direct-key input refinement */
.hy-target-romaji-display {
  display: grid;
  gap: 5px;
  margin: 10px 0 8px;
  padding: 12px 14px;
  border: 1px solid rgba(35, 168, 199, 0.22);
  border-radius: 16px;
  background: rgba(230, 250, 255, 0.58);
}
.hy-target-romaji-display span {
  color: var(--hy-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hy-target-romaji-display strong {
  color: var(--hy-primary-dark);
  font-size: clamp(1rem, 2.1vw, 1.28rem);
  line-height: 1.65;
  word-break: break-word;
}
.hy-typing-input.is-romaji-guarded {
  caret-color: transparent;
  background: linear-gradient(180deg, #ffffff, #f8fdff);
}
.hy-stage-best,
.hy-local-best-note {
  display: none !important;
}


/* v0.5.0 Mobile input diagnostic */
.hy-mobile-diagnostic-wrap {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(35, 168, 199, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}
.hy-mobile-diagnostic-wrap summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--hy-primary-dark);
}
.hy-diagnostic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.hy-diagnostic-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--hy-line);
  font-size: 16px;
  background: #fff;
}
.hy-diagnostic-log {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.45;
  background: #0f172a;
  color: #e0f2fe;
  padding: 12px;
  border-radius: 14px;
}


/* v0.5.1 Mobileブラウザ互換入力 */
.hy-typing-input {
  resize: none;
  line-height: 1.5;
  min-height: 3.2rem;
}
.hy-typing-input.is-mobile-capture {
  caret-color: auto;
  touch-action: manipulation;
}


/* v0.5.8 Mobile custom QWERTY keyboard */
.hy-mode-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(230, 250, 255, 0.72);
  border: 1px solid rgba(35, 168, 199, 0.18);
  color: var(--hy-muted);
  font-size: 0.88rem;
  font-weight: 800;
}
.hy-mode-note strong {
  color: var(--hy-primary-dark);
}
.hy-typing-input.is-mobile-virtual {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.hy-mobile-keyboard[hidden] {
  display: none !important;
}
.hy-mobile-keyboard {
  margin-top: 14px;
  padding: clamp(10px, 2.8vw, 18px);
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: clamp(18px, 4vw, 28px);
  background: linear-gradient(180deg, #eef3f8, #dce5ee);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 12px 28px rgba(15, 23, 42, 0.10);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.hy-mobile-keyboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #334155;
}
.hy-mobile-keyboard-head strong,
.hy-mobile-keyboard-head span {
  display: block;
}
.hy-mobile-keyboard-head strong {
  font-size: clamp(0.88rem, 2.7vw, 1.02rem);
  font-weight: 900;
}
.hy-mobile-keyboard-head span {
  color: #64748b;
  font-size: clamp(0.74rem, 2.3vw, 0.88rem);
  font-weight: 800;
}
.hy-mobile-keyboard-status {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  min-width: 8.8em;
}
.hy-mobile-keyboard-keys {
  display: grid;
  gap: clamp(6px, 1.7vw, 10px);
}
.hy-mobile-key-row {
  display: flex;
  justify-content: center;
  gap: clamp(4px, 1.25vw, 8px);
}
.hy-mobile-key {
  flex: 1 1 0;
  max-width: 4.2rem;
  min-width: 0;
  min-height: clamp(38px, 9.5vw, 56px);
  border: 0;
  border-radius: clamp(9px, 2.4vw, 14px);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #0f172a;
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.20), 0 4px 10px rgba(15, 23, 42, 0.12);
  font-size: clamp(1rem, 4.6vw, 1.28rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hy-mobile-key:active,
.hy-mobile-key.is-buffered {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.14);
}
.hy-mobile-key.is-segment {
  outline: 2px solid rgba(35, 168, 199, 0.28);
  background: linear-gradient(180deg, #f0fdff, #e0f7fb);
}
.hy-mobile-key.is-next {
  outline: 3px solid rgba(35, 168, 199, 0.78);
  background: linear-gradient(180deg, #ecfeff, #cffafe);
}
.hy-mobile-key.is-action {
  flex: 0 1 8.8rem;
  max-width: 11rem;
  text-transform: none;
  font-size: clamp(0.92rem, 3.7vw, 1.08rem);
  color: #334155;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
}
.hy-mobile-key:disabled {
  opacity: 0.48;
}
@media (min-width: 720px) {
  .hy-mobile-keyboard {
    width: min(760px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
  .hy-mobile-key {
    min-height: 58px;
    font-size: 1.18rem;
  }
}
@media (max-width: 420px) {
  .hy-mobile-keyboard {
    margin-left: -8px;
    margin-right: -8px;
  }
  .hy-mobile-key-row {
    gap: 4px;
  }
  .hy-mobile-key {
    min-height: 40px;
    border-radius: 10px;
  }
  .hy-mobile-keyboard-head {
    display: grid;
  }
  .hy-mobile-keyboard-status {
    justify-items: start;
    text-align: left;
  }
}


/* v0.5.9 Mobile compact playroom and romaji key target */
.hy-play-card.is-mobile-mode .hy-target-romaji-display,
.hy-play-card.is-mobile-mode .hy-mode-note {
  display: none !important;
}
.hy-input-guard-notice.is-mobile-only {
  display: block;
  min-height: 0;
  margin: 0;
  color: var(--hy-danger);
  font-weight: 900;
}
.hy-target-romaji.is-mobile-keys {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(35, 168, 199, 0.18);
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  line-height: 1.65;
  font-size: clamp(0.92rem, 3.2vw, 1.14rem);
  letter-spacing: 0.02em;
}
.hy-mobile-key-target-label {
  display: block;
  margin-bottom: 5px;
  color: var(--hy-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.hy-mobile-key-target-text {
  display: block;
  color: var(--hy-primary-dark);
  font-weight: 900;
  word-break: break-word;
}
.hy-target-romaji.is-mobile-plain .hy-mobile-key-target-text {
  color: #475569;
}
.hy-target-romaji.is-mobile-colored .hy-char {
  margin-right: 2px;
}
.hy-target-romaji.is-mobile-plain .hy-char,
.hy-target-romaji.is-mobile-plain .hy-char.is-current,
.hy-target-romaji.is-mobile-plain .hy-char.is-done,
.hy-target-romaji.is-mobile-plain .hy-char.is-miss {
  color: inherit;
  background: transparent;
  animation: none;
}
.hy-play-card.is-mobile-mode .hy-target-jp {
  margin-bottom: 6px;
}
.hy-play-card.is-mobile-mode .hy-target-reading {
  margin-bottom: 6px;
  font-size: clamp(0.92rem, 3.4vw, 1.08rem);
  line-height: 1.55;
}
.hy-play-card.is-mobile-mode .hy-meter {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.hy-play-card.is-mobile-mode .hy-meter span {
  padding: 7px 8px;
  font-size: 0.82rem;
}
@media (max-width: 520px) {
  .hy-play-card.is-mobile-mode {
    padding-left: clamp(12px, 3vw, 18px);
    padding-right: clamp(12px, 3vw, 18px);
  }
  .hy-target-romaji.is-mobile-keys {
    padding: 8px 10px;
  }
  .hy-mobile-keyboard-head {
    margin-bottom: 8px;
  }
}


/* v0.6.0 one-sentence display and mobile key highlight specification */
.hy-current-sentence {
  font: inherit;
}
.hy-next-sentence-preview {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 0.88em;
  font-weight: 800;
  line-height: 1.45;
}
.hy-next-sentence-preview span {
  display: inline-block;
  margin-right: 0.45em;
  padding: 0.12em 0.5em;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 0.78em;
  letter-spacing: 0.08em;
}
.hy-mobile-key.is-segment:not(.is-next) {
  color: #0f5f75;
}


/* v0.6.2 compact sentence display for PC Kana and clean meters */
.hy-input-guard-notice.is-compact-only {
  display: block;
  min-height: 0;
  margin: 0;
  color: var(--hy-danger);
  font-weight: 900;
}
.hy-target-romaji.is-japanese-line-mode {
  line-height: 1.75;
}
.hy-target-romaji.is-japanese-line-mode .hy-current-sentence {
  display: block;
}
.hy-target-romaji.is-japanese-line-mode .hy-next-sentence-preview {
  display: block;
  margin-top: 8px;
}
.hy-target-jp .hy-current-sentence,
.hy-target-romaji .hy-current-sentence {
  word-break: break-word;
}
.hy-target-jp .hy-next-sentence-preview,
.hy-target-romaji .hy-next-sentence-preview {
  word-break: break-word;
}
@media (max-width: 720px) {
  .hy-meter span {
    font-size: 0.84rem;
  }
}


/* v0.6.6 UI整理：プレイヤー状態6カードを広い画面で1行に寄せる */
@media (min-width: 1180px) {
  #benefits.hy-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* v0.6.6 ランキング説明は文ごとに読みやすく改行 */
.hy-ranking-note {
  line-height: 1.75;
}


/* v0.6.6: 開始前確認パネル。誤タップによるポイント消費を防ぐ。 */
.hy-start-confirm {
  border: 1px solid rgba(33, 184, 207, 0.28);
  background: linear-gradient(180deg, rgba(236, 252, 255, 0.96), rgba(255, 255, 255, 0.98));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(9, 93, 115, 0.12);
  outline: none;
}

.hy-start-confirm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #07839a;
  background: rgba(33, 184, 207, 0.12);
  border: 1px solid rgba(33, 184, 207, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hy-start-confirm > strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  color: #0f1d33;
}

.hy-start-stage {
  margin: 10px 0 0;
  color: #476171;
  font-weight: 700;
  line-height: 1.75;
}

.hy-start-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hy-start-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #08758b;
  background: rgba(33, 184, 207, 0.1);
  border: 1px solid rgba(33, 184, 207, 0.22);
  font-weight: 800;
}

.hy-start-warning {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #8a3d00;
  background: rgba(255, 183, 77, 0.18);
  border: 1px solid rgba(255, 152, 0, 0.3);
  font-weight: 800;
  line-height: 1.7;
}

.hy-start-note {
  margin: 10px 0 0;
  color: #607386;
  font-size: 0.95rem;
  line-height: 1.7;
}

.hy-start-actions {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .hy-start-confirm {
    padding: 18px;
    border-radius: 20px;
  }
  .hy-start-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hy-start-actions button {
    width: 100%;
  }
}


/* v0.6.7: ステータス内に入力方式・タイプ音を統合 */
.hy-status-settings-grid {
  margin-top: 18px;
}
.hy-status-panel .hy-mobile-diagnostic-wrap {
  margin-top: 14px;
}
.hy-status-panel .hy-ranking-class {
  margin-top: 14px;
}
@media (min-width: 1180px) {
  .hy-status-panel .hy-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.hy-replay-button {
  appearance: none;
  border: 1px solid rgba(23, 162, 184, 0.35);
  background: rgba(225, 247, 252, 0.95);
  color: #00748a;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.hy-replay-button:hover {
  filter: brightness(0.98);
}
.hy-ranking-replay-host {
  margin-bottom: 18px;
}
.hy-ranking-replay-card {
  border: 1px solid rgba(23, 162, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(0, 80, 100, 0.08);
}
.hy-ranking-replay-card.is-error {
  border-color: rgba(190, 20, 20, 0.25);
}
.hy-ranking-replay-head,
.hy-ranking-replay-toolbar,
.hy-ranking-replay-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hy-ranking-replay-head {
  justify-content: space-between;
  margin-bottom: 12px;
}
.hy-ranking-replay-head span {
  display: block;
  color: #64748b;
  font-size: 0.92rem;
}
.hy-replay-close {
  border: 0;
  background: #eef2f7;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}
.hy-ranking-replay-toolbar {
  margin: 12px 0;
}
.hy-ranking-replay-meta {
  color: #64748b;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.hy-ranking-replay-target {
  min-height: 80px;
  line-height: 1.9;
  padding: 16px;
  background: rgba(234, 250, 253, 0.7);
  border: 1px solid rgba(23, 162, 184, 0.2);
  border-radius: 16px;
  word-break: break-all;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
}
.hy-ranking-replay-target span {
  display: inline-block;
  padding: 0 1px;
}
.hy-ranking-replay-target .is-done {
  color: #00748a;
  background: rgba(85, 205, 225, 0.23);
}
.hy-ranking-replay-target .is-current {
  color: #fff;
  background: #13aeca;
  border-radius: 4px;
}
.hy-ranking-replay-typed {
  margin-top: 10px;
  min-height: 42px;
  padding: 12px;
  border-radius: 14px;
  background: #f7fbfc;
  color: #334155;
  white-space: pre-wrap;
}
.hy-ranking-replay-card.is-miss-flash .hy-ranking-replay-target {
  outline: 3px solid rgba(198, 40, 40, 0.65);
}


/* v0.9.1: PC Romajiは、別カードのローマ字ヒントではなく入力進行欄でMobile風に表示する */
.hy-target-romaji.is-pc-romaji-keys {
  font-size: clamp(1.05rem, 2.4vw, 1.42rem);
}
.hy-target-romaji.is-pc-romaji-keys .hy-mobile-key-target-label {
  letter-spacing: 0.04em;
}
.hy-target-romaji.is-pc-romaji-keys .hy-char {
  margin-right: 2px;
}


.hy-char.is-word-space {
  min-width: 1.05em;
}


.hy-ranking-replay-note {
  margin: 10px 0 14px;
  color: var(--hy-muted);
  font-size: 0.92rem;
}

.hy-replay-button {
  margin-top: 8px;
  width: fit-content;
}


/* v0.10.16: ランキングリプレイを実プレイ画面に近づける */
.hy-ranking-replay-card.is-actual-play {
  background:
    radial-gradient(circle at 18% 16%, rgba(214, 246, 252, 0.9), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 253, 255, 0.96));
}

.hy-ranking-replay-scrub {
  width: 100%;
  margin: 10px 0 16px;
  accent-color: #18aeca;
}

.hy-replay-play-card {
  border: 1px solid rgba(23, 162, 184, 0.25);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: clamp(16px, 2.4vw, 26px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.hy-replay-question {
  margin: 26px 0 12px;
  color: var(--hy-ink);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.45;
}

.hy-replay-reading {
  color: var(--hy-muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.hy-replay-input-keys {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(23, 162, 184, 0.22);
  background: rgba(232, 249, 252, 0.75);
  border-radius: 18px;
  min-height: 86px;
}

.hy-replay-input-keys .hy-mobile-key-target-text {
  display: block;
  margin-top: 10px;
  color: #087f98;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  line-height: 1.85;
  letter-spacing: 0.08em;
  word-break: break-word;
}

.hy-replay-input-keys .hy-mobile-key-target-text span {
  display: inline-block;
  min-width: 0.62em;
  text-align: center;
  border-radius: 7px;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.hy-replay-input-keys .hy-mobile-key-target-text .is-done {
  color: #087f98;
  background: rgba(105, 214, 231, 0.23);
}

.hy-replay-input-keys .hy-mobile-key-target-text .is-current {
  color: #fff;
  background: #18aeca;
  box-shadow: 0 10px 24px rgba(24, 174, 202, 0.28);
  transform: translateY(-1px);
}

.hy-replay-key-gap {
  min-width: 0.95em;
}

.hy-replay-input {
  margin-top: 14px;
  resize: none;
  min-height: 64px;
  color: var(--hy-ink);
  background: rgba(255, 255, 255, 0.92);
}

.hy-replay-meter {
  margin-top: 14px;
}

.hy-ranking-replay-card.is-miss-flash .hy-replay-input-keys {
  outline: 3px solid rgba(198, 40, 40, 0.45);
}


/* v0.10.18: リプレイは全文ではなく、現在の一文/問題単位で見せる */
.hy-replay-next-preview {
  margin-top: 12px;
  color: var(--hy-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.98rem, 1.7vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hy-replay-next-preview span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(15, 35, 60, 0.06);
  color: #567086;
  font-family: inherit;
}

.hy-replay-reading[hidden] {
  display: none;
}


/* v0.10.19: Kana/Mobileリプレイでも現在文表示に寄せる */
.hy-replay-input {
  overflow: hidden;
}
