@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Zen+Antique+Soft&family=Yuji+Syuku&display=swap');

:root {
  --bg-color: #2d1b14;
  --bg-secondary: #3d2518;
  --card-bg: #f5f0e1;
  --card-border: #8b7355;
  --accent: #c41e3a;
  --accent-hover: #a01830;
  --text: #f5f0e1;
  --text-muted: #a89880;
  --text-dark: #2d1b14;
  --win: #2e8b57;
  --lose: #c41e3a;
  --draw: #daa520;
  --gold: #d4af37;
  --font-brush: 'Yuji Syuku', serif;
  --font-main: 'Zen Antique Soft', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main), 'Noto Sans JP', sans-serif;
  background: var(--bg-color) url("/assets/backg-c47be8e9.webp") repeat;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.8;
}

/* Header */
.header {
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-color));
  padding: 1rem;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

/* ゲーム中はヘッダーを非表示 */
body.games-play .header,
body.games-round_result .header,
body.games-result .header {
  display: none;
}

/* Main */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0.5rem;
}

/* Flash */
.flash {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-align: center;
}

.flash.notice {
  background: rgb(78, 204, 163);
  border: 1px solid var(--win);
  color: #1a1a2e;
}

.flash.alert {
  background: rgb(233, 69, 96);
  border: 1px solid var(--lose);
  color: #fff;
}

/* Buttons */
.btn {
  font-family: var(--font-brush);
  background: linear-gradient(to bottom, var(--accent), #8b0000);
  color: white;
  border: 2px solid var(--gold);
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn:hover {
  background: linear-gradient(to bottom, #d4243e, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.btn:disabled {
  background: #5a5a5a;
  border-color: #777;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-large {
  padding: 1rem 3rem;
  font-size: 1.3rem;
}

.btn-secondary {
  background: linear-gradient(to bottom, #5a4a3a, #3d2518);
  border-color: var(--card-border);
}

.btn-secondary:hover {
  background: linear-gradient(to bottom, #6a5a4a, #4d3528);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

/* Home */
.home {
  text-align: center;
  padding: 0.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-logo {
  max-width: 280px;
  height: auto;
  display: block;
}

.home-logo-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 1.5rem;
}

.home-logo-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-mask-image: url("/assets/logo-03fd7312.webp");
  mask-image: url("/assets/logo-03fd7312.webp");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: top left;
  mask-position: top left;
  animation: shine-mask 1s ease-in-out 0.2s forwards;
  pointer-events: none;
}

@keyframes shine-mask {
  0% {
    background-position: 150% 0;
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  95% {
    background-position: -50% 0;
    opacity: 1;
  }
  100% {
    background-position: -50% 0;
    opacity: 0;
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 150%;
  }
}

.subtitle {
  font-family: var(--font-main);
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.guest-notice {
  font-size: 1rem;
  color: #ffeb3b;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-weight: bold;
  text-shadow: 0 0 8px #000, 0 0 15px #000, 0 0 25px rgba(0, 0, 0, 0.9);
}

.game-description {
  max-width: 700px;
  margin-top: 2rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--card-border);
}

.game-description h2 {
  font-family: var(--font-brush);
  font-size: 1.5rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.3rem;
}

.game-description ol {
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.4;
}

.game-description li {
  margin-bottom: 0.2rem;
}

.game-description ol li::marker {
  color: #e91e63;
  font-weight: bold;
}

.game-description .coming-soon {
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.game-description ul {
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.4;
}

.game-description ul li {
  margin-bottom: 0.2rem;
}

.member-benefits {
  margin-top: 1.5rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1.2rem;
}

.member-benefits h3 {
  font-family: var(--font-brush);
  font-size: 1.5rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.2rem;
}

.member-benefits ul {
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

.register-cta {
  text-align: center;
  margin-top: 1.2rem;
}

.btn-register {
  background: linear-gradient(to bottom, var(--gold), #b8960b);
  color: #1a1a2e;
  border-color: #8b7355;
}

.btn-register:hover {
  background: linear-gradient(to bottom, var(--accent), #8b0000);
}

/* Game Setup */
.game-setup {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.game-setup h1 {
  font-family: var(--font-brush);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--gold);
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.setup-title {
  font-family: var(--font-brush);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Theme Grid - mobile first (vertical stack) */
.theme-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.theme-card {
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border: 3px solid var(--card-border);
  border-radius: 8px;
  padding: 1.2rem;
  cursor: pointer;
  display: block;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
  text-align: center;
}

.theme-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.theme-card input {
  display: none;
}

.theme-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent);
}

.theme-card-placeholder {
  cursor: default;
  opacity: 0.8;
}

.theme-card-placeholder:hover {
  transform: none;
  border-color: var(--card-border);
}

.theme-name {
  font-family: var(--font-brush);
  font-size: 1.5rem;
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.5rem;
}

.theme-desc {
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--card-border);
}

/* CPU Select Page - Carousel */
.cpu-select {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

.cpu-form {
  text-align: center;
}

.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
}

.carousel-track {
  width: 95vw;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.cpu-image-large {
  width: 100%;
  height: 100%;
  border: 4px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.3);
  overflow: hidden;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 50%, #050510 100%);
}

.cpu-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cpu-image-large .placeholder-text {
  font-family: var(--font-main);
  font-size: 2rem;
  color: var(--text-muted);
  position: absolute;
}

.cpu-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  text-align: center;
  border-radius: 0 0 12px 12px;
}

.cpu-name {
  font-family: var(--font-brush);
  font-size: 1.8rem;
  color: #fff;
  display: block;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.cpu-difficulty {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  display: inline-block;
  margin-top: 0.3rem;
}

.difficulty-easy {
  background: #4caf50;
  color: white;
}

.difficulty-normal {
  background: #ff9800;
  color: white;
}

.difficulty-hard {
  background: #f44336;
  color: white;
}

.carousel-btn {
  background: rgba(255,255,255,0.7);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 2.5rem;
  width: 150px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 4px;
}

.carousel-prev::before {
  content: '‹';
  animation: arrow-left 0.4s ease-in-out 3;
}

.carousel-next::after {
  content: '›';
  animation: arrow-right 0.4s ease-in-out 3;
}

@keyframes arrow-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

@keyframes arrow-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.carousel-btn:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}

.carousel-counter {
  font-family: var(--font-main);
  font-size: 1.2rem;
  color: var(--text-light);
  min-width: 60px;
  text-align: center;
}

/* Desktop carousel */
@media (min-width: 769px) {
  .carousel-track {
    width: 60vw;
    max-width: 550px;
  }
}

/* Game Exit */
.game-exit {
  position: relative;
}

.exit-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  z-index: 100;
  transition: color 0.2s;
}

.exit-link:hover {
  color: var(--gold);
}

/* Confirm Modal */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.confirm-modal.active {
  display: flex;
}

.confirm-modal-content {
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border: 4px solid var(--gold);
  border-radius: 12px;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.confirm-message {
  font-family: var(--font-brush);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.confirm-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-buttons .btn {
  min-width: 80px;
}

.btn-cancel {
  background: linear-gradient(to bottom, #888 0%, #666 100%);
}

.btn-cancel:hover {
  background: linear-gradient(to bottom, #777 0%, #555 100%);
}

/* Start Modal */
.start-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.start-modal.active {
  display: flex;
}

.start-modal-content {
  background: rgba(0, 0, 0, 0.85);
  border: 3px solid var(--gold);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.start-modal-content h2 {
  font-family: var(--font-brush);
  font-size: 1.8rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
}

.start-modal-content ol {
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.start-modal-content ol li {
  margin-bottom: 0.4rem;
}

.start-modal-content ol li::marker {
  color: #e91e63;
  font-weight: bold;
}

.start-modal-content .start-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 1.5rem;
}

.start-modal-content .member-benefits {
  margin-top: 0;
  border-top: 1px solid var(--card-border);
  padding-top: 1rem;
}

.start-modal-content .member-benefits h3 {
  font-family: var(--font-brush);
  font-size: 1.3rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
}

.start-modal-content .member-benefits ul {
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.start-modal-content .register-cta {
  text-align: center;
}

/* Game Board */
.game-board {
  max-width: 1080px;
  margin: 0 auto;
}

.round-info {
  font-family: var(--font-brush);
  text-align: center;
  color: var(--gold);
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.parent-card {
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border: 4px solid var(--gold);
  border-radius: 8px;
  padding: 0.8rem 2rem;
  text-align: center;
  margin-bottom: 1rem;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    inset 0 0 30px rgba(212,175,55,0.1);
  position: relative;
  overflow: hidden;
}

.parent-card-cpu {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  height: 120%;
  width: auto;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.parent-card::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid rgba(212,175,55,0.4);
  border-radius: 4px;
  pointer-events: none;
}

.card-label {
  font-family: var(--font-brush);
  font-size: 1.4rem;
  color: var(--card-border);
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
}

.card-name {
  font-family: var(--font-brush);
  font-size: 1.6rem;
  color: var(--text-dark);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

/* Compact parent card for round result */
.parent-card-wrapper {
  position: relative;
  margin-bottom: 0.5rem;
  z-index: 1;
}

.parent-card-compact {
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.parent-card-compact::before {
  display: none;
}

.card-label-inline {
  font-family: var(--font-brush);
  font-size: 1.1rem;
  color: var(--card-border);
}

.card-name-inline {
  font-family: var(--font-brush);
  font-size: 1.3rem;
  color: var(--text-dark);
  letter-spacing: 0.05em;
}

.result-cpu-image {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 480px;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hand-section {
  margin-bottom: 2rem;
}

.hand-instruction {
  font-family: var(--font-main);
  text-align: center;
  color: var(--text);
  margin: 0;
  font-size: 1.1rem;
}

.hand {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  max-width: 648px;
  margin: 0 auto;
}

.card {
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border: 3px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  box-shadow:
    2px 2px 4px rgba(0,0,0,0.3),
    inset 0 0 20px rgba(139,115,85,0.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(139,115,85,0.3);
  border-radius: 3px;
  pointer-events: none;
}

.card input {
  display: none;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.card.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent),
    0 8px 16px rgba(196,30,58,0.3);
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.selection-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 10;
}

.card-content {
  font-family: var(--font-brush);
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: var(--text-dark);
  font-size: 1.3rem;
  line-height: 1.4;
  letter-spacing: 0.15em;
  text-align: center;
}

.submit-form {
  text-align: center;
}

/* Round Result */
.round-result {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  padding-top: 180px;
}

.result-display {
  font-family: var(--font-brush);
  font-size: 3.5rem;
  margin-bottom: 0.2rem;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 10px rgba(0,0,0,0.8),
    0 0 20px rgba(0,0,0,0.6);
  letter-spacing: 0.2em;
  position: relative;
  z-index: 2;
}

.result-display.win { color: var(--win); }
.result-display.lose { color: var(--lose); }
.result-display.draw { color: var(--draw); }

.cards-display {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.player-cards,
.cpu-cards {
  flex: 1;
}

.player-cards h3,
.cpu-cards h3 {
  font-family: var(--font-brush);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cards-display .card {
  cursor: default;
  margin-bottom: 0.5rem;
}

.phrase {
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border: 3px solid var(--card-border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.phrase .word {
  display: block;
  font-family: var(--font-brush);
  color: var(--text-dark);
  font-size: clamp(0.5rem, 3.5vw, 1.32rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
  white-space: nowrap;
}

.phrase .word:last-child {
  margin-bottom: 0;
}

.score-display {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  font-family: var(--font-brush);
  font-size: 1.65rem;
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border-radius: 8px;
  padding: 0.4rem 1.5rem;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.5);
  max-width: 672px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.round-result .btn {
  position: relative;
  z-index: 1;
}

.score-display .wins { color: var(--win); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.score-display .losses { color: var(--lose); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.score-display .draws { color: var(--draw); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

/* Final Result */
.final-result {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 180px;
}

.result-banner {
  font-family: var(--font-brush);
  font-size: 4rem;
  margin-bottom: 0.2rem;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 10px rgba(0,0,0,0.8),
    0 0 20px rgba(0,0,0,0.6);
  letter-spacing: 0.3em;
  position: relative;
  z-index: 2;
}

.result-banner.win {
  color: #ff4444;
}

.result-banner.lose {
  color: #4a0080;
  position: relative;
  display: inline-block;
  animation: appear 2s ease-out forwards;
}

@keyframes appear {
  0% {
    filter: blur(4px) drop-shadow(0 15px 30px rgba(74, 0, 128, 0.1));
    opacity: 0;
  }
  30% {
    filter: blur(3px) drop-shadow(0 10px 20px rgba(74, 0, 128, 0.2));
    opacity: 0.3;
  }
  60% {
    filter: blur(1px) drop-shadow(0 5px 10px rgba(74, 0, 128, 0.4));
    opacity: 0.7;
  }
  100% {
    filter: blur(0px) drop-shadow(0 0 5px rgba(74, 0, 128, 0.5));
    opacity: 1;
  }
}
.result-banner.draw { color: var(--draw); }

.final-score {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #f5f0e1 0%, #e8e0c8 100%);
  border-radius: 8px;
  padding: 1rem 2rem;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  z-index: 1;
}

.final-result .parent-card {
  position: relative;
  z-index: 1;
}

.final-result .actions {
  position: relative;
  z-index: 1;
}

.score-item {
  text-align: center;
}

.score-item .label {
  font-family: var(--font-main);
  display: block;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.score-item .value {
  font-family: var(--font-brush);
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.score-item.wins .value { color: var(--win); }
.score-item.draws .value { color: var(--draw); }
.score-item.losses .value { color: var(--lose); }

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Import */
.import-page {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.7);
  padding: 2rem;
  border-radius: 12px;
}

.import-page h1 {
  text-align: center;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.existing-pack-notice {
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.existing-pack-notice .notice-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--gold);
  color: #1a1a2e;
  border-color: var(--gold);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h3 {
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.form-section .max-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.card-counter,
.chip-counter {
  font-size: 0.9rem;
  color: var(--gold);
  margin-left: 0.5rem;
  font-weight: normal;
}

/* Chip Form */
.chip-input-wrapper {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.chip-input-wrapper .input-field {
  flex: 1;
}

.btn-add-chip {
  background: var(--gold);
  color: #1a1a2e;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
}

.btn-add-chip:hover {
  background: #b8960b;
}

.chip-list-wrapper {
  margin-top: 0.5rem;
}

.chip-list-wrapper.collapsed .chip-list {
  display: none;
}

.chip-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
}

.chip-toggle:hover {
  color: var(--gold);
}

.toggle-icon {
  display: inline-block;
  width: 1em;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
}

.chip-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}

.chip-remove:hover {
  opacity: 1;
}

.form-actions {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.form-actions .btn {
  white-space: nowrap;
  font-size: clamp(0.75rem, 3vw, 1rem);
  padding: 0.6rem 0.8rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.form-section .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.input-field {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: #1a1a2e;
  font-size: 1rem;
}

.input-field:focus {
  outline: none;
  border-color: var(--gold);
}

.input-field::placeholder {
  color: #888;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-input {
  display: flex;
  gap: 0.5rem;
}

.btn-add {
  background: transparent;
  border: 1px dashed var(--gold);
  color: var(--gold);
}

.btn-add:hover {
  background: rgba(212, 175, 55, 0.2);
}

.btn-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-input {
  width: 100%;
  padding: 1rem;
  background: #fff;
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  color: #1a1a2e;
}

.format-guide {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.format-guide h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.format-guide pre {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
}

.import-form .field {
  margin-bottom: 1rem;
}

.import-form label {
  display: block;
  margin-bottom: 0.5rem;
}

/* Mypage */
.mypage {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  color: #1a1a2e;
}

.mypage h1 {
  margin-bottom: 2rem;
  text-align: center;
  color: #5a3d2b;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  background: rgba(139, 90, 43, 0.15);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

.stat-item {
  text-align: center;
}

.stat-item .label {
  display: block;
  font-size: 0.9rem;
  color: #666;
}

.stat-item .value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #8b5a2b;
}

.mypage-actions {
  margin-bottom: 2rem;
  text-align: center;
}

.btn-theme-create {
  display: inline-block;
  background: #c9a227;
  color: #1a1a2e;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  transition: background 0.2s;
}

.btn-theme-create:hover {
  background: #a8871f;
}

.mypage h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #5a3d2b;
}

.records {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.record-item {
  background: var(--card-bg);
  color: #1a1a2e;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--card-border);
}

.record-item.win { border-left-color: var(--win); }
.record-item.lose { border-left-color: var(--lose); }
.record-item.draw { border-left-color: var(--draw); }

.record-item .theme {
  font-weight: bold;
}

.record-item .difficulty {
  font-size: 0.9rem;
  color: #666;
}

.record-item .result {
  font-weight: bold;
}

.record-item .date {
  font-size: 0.9rem;
  color: #666;
}

/* Admin */
.admin-body {
  background: #f5f5f5;
  color: #333;
}

.admin-header {
  background: #333;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header .logo {
  color: white;
}

.admin-header nav {
  display: flex;
  gap: 1rem;
}

.admin-header nav a {
  color: white;
  text-decoration: none;
}

.admin-main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.admin-users h1,
.admin-settings h1 {
  margin-bottom: 1rem;
}

.users-table {
  width: 100%;
  background: white;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.users-table th {
  background: #f0f0f0;
}

.admin-settings .field {
  margin-bottom: 1rem;
}

.admin-settings label {
  display: block;
  margin-bottom: 0.3rem;
}

.admin-settings input[type="number"] {
  padding: 0.5rem;
  width: 100px;
}

/* Devise forms */
.devise-form {
  max-width: 400px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(61,37,24,0.9), rgba(45,27,20,0.95));
  padding: 2.5rem;
  border-radius: 12px;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.devise-form h2 {
  font-family: var(--font-brush);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--gold);
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.devise-form .field {
  margin-bottom: 1.2rem;
}

.devise-form label {
  font-family: var(--font-main);
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1rem;
}

.devise-form .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.devise-form input[type="email"],
.devise-form input[type="password"],
.devise-form input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid var(--card-border);
  border-radius: 6px;
  background: linear-gradient(135deg, #f5f0e1, #e8e0c8);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.devise-form input[type="email"]:focus,
.devise-form input[type="password"]:focus,
.devise-form input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.3);
}

.devise-form input::placeholder {
  color: #999;
}

.devise-form .field.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.devise-form .field.checkbox input {
  width: auto;
}

.devise-form .field.checkbox label {
  display: inline;
  margin-bottom: 0;
}

.devise-form .actions {
  margin-top: 2rem;
  text-align: center;
}

.devise-form .actions .btn {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

.devise-form .links {
  margin-top: 1.5rem;
  text-align: center;
}

.devise-form .links a {
  font-family: var(--font-main);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.devise-form .links a:hover {
  color: var(--gold);
}

.devise-form #error_explanation {
  background: rgba(196,30,58,0.2);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.devise-form #error_explanation h2 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.devise-form #error_explanation ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.danger-zone {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(196,30,58,0.3);
}

.danger-zone h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.danger-zone p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-danger {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-main);
}

.btn-danger:hover {
  background: #a01830;
}

/* PC・タブレット向けレスポンシブ */
@media (min-width: 768px) {
  /* Theme grid 2x2 on desktop */
  .theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
  }

  .theme-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 860px;
    margin: 0 auto;
  }

  .hand .card {
    width: 160px;
    aspect-ratio: 5 / 7.2;
    padding: 0.6rem 0.4rem;
  }

  .hand .card .card-content {
    font-size: 1.1rem;
  }
}


/* Sound warning */
.sound-warning {
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
  margin: 1.5rem auto 0;
  background: rgba(255, 100, 100, 0.85);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  display: block;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Sound toggle button */
.sound-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.2s;
}

.sound-toggle:hover {
  background: var(--bg-color);
}

.sound-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
}

.sound-toggle.muted svg.icon-sound-on,
.sound-toggle:not(.muted) svg.icon-sound-off {
  display: none;
}

.sound-toggle.muted svg.icon-sound-off,
.sound-toggle:not(.muted) svg.icon-sound-on {
  display: block;
}

/* ========================================
   Hukyu Quiz Styles
   ======================================== */
.hukyu-quiz {
  font-family: 'Noto Serif JP', serif;
  background: linear-gradient(135deg, #0d1f1a 0%, #1a3a2f 30%, #0f2922 70%, #0a1915 100%);
  min-height: 100vh;
  color: #e8f5e9;
  position: relative;
  overflow-x: hidden;
}

.hukyu-quiz::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(0, 100, 80, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 150, 136, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(38, 166, 154, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Password Modal */
.hukyu-password-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.hukyu-password-box {
  background: linear-gradient(135deg, #1a2f1a 0%, #0d1f0d 100%);
  border: 1px solid rgba(129, 199, 132, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  max-width: 320px;
}

.hukyu-password-box p {
  color: #c8e6c9;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.hukyu-password-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(129, 199, 132, 0.4);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #e8f5e9;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.hukyu-password-input::placeholder {
  color: rgba(200, 230, 201, 0.5);
}

.hukyu-password-input:focus {
  outline: none;
  border-color: #81c784;
}

.hukyu-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Particles */
.hukyu-particles {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -20px;
  width: 4px;
  height: 4px;
  background: rgba(129, 199, 132, 0.6);
  border-radius: 50%;
  animation: float-up linear infinite;
  box-shadow: 0 0 6px rgba(129, 199, 132, 0.4);
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Top Page */
.hukyu-top {
  text-align: center;
  max-width: 600px;
}

.hukyu-logo {
  margin-bottom: 2rem;
}

.hukyu-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 600;
  font-style: italic;
  color: #a5d6a7;
  text-shadow: 0 0 30px rgba(129, 199, 132, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  letter-spacing: 0.05em;
}

.hukyu-subtitle {
  font-size: 1.3rem;
  color: #80cbc4;
  margin-top: 0.5rem;
  letter-spacing: 0.3em;
}

.hukyu-description {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.hukyu-description p {
  margin: 0.3rem 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hukyu-welcome {
  font-size: 2.2rem !important;
  font-weight: 700;
  color: #66bb6a;
  position: relative;
  display: inline-block;
  background: linear-gradient(
    90deg,
    #66bb6a 0%,
    #66bb6a 45%,
    #ffffff 50%,
    #66bb6a 55%,
    #66bb6a 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hukyu-shine 4s linear infinite;
}

@keyframes hukyu-shine {
  0% {
    background-position: 100% center;
  }
  50% {
    background-position: 0% center;
  }
  50.1%, 100% {
    background-position: 100% center;
  }
}

/* Buttons */
.hukyu-btn {
  font-family: 'Noto Serif JP', serif;
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.hukyu-btn-primary {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(38, 166, 154, 0.4);
}

.hukyu-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(38, 166, 154, 0.6);
}

.hukyu-btn-secondary {
  background: transparent;
  color: #80cbc4;
  border: 1px solid #80cbc4;
}

.hukyu-btn-secondary:hover {
  background: rgba(128, 203, 196, 0.1);
}

.hukyu-btn-small {
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
}

.hukyu-btn-twitter {
  background: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hukyu-btn-twitter:hover {
  background: #333;
}

.hukyu-twitter-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hukyu-btn-gold {
  background: linear-gradient(135deg, #c9a227 0%, #a8871f 100%);
  color: #1a1a2e;
}

.hukyu-btn-gold:hover {
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

.hukyu-book-link {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hukyu-book-link p {
  font-size: 0.95rem;
  color: #80cbc4;
  margin-bottom: 1rem;
}

/* Quiz Screen */
.hukyu-quiz-screen {
  width: 100%;
  max-width: 700px;
}

.hukyu-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hukyu-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.hukyu-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #26a69a, #4db6ac);
  transition: width 0.3s ease;
}

.hukyu-progress-text {
  font-size: 0.95rem;
  color: #80cbc4;
  min-width: 60px;
  text-align: right;
}

.hukyu-question-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  transition: opacity 0.3s ease;
}

.hukyu-question-card.answered {
  opacity: 0.6;
  pointer-events: none;
}

.hukyu-question-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #4db6ac;
  margin-bottom: 1rem;
}

.hukyu-question-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Choice buttons */
.hukyu-choices {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hukyu-choice-btn {
  font-family: 'Noto Serif JP', serif;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e8f5e9;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.hukyu-choice-btn:hover {
  background: rgba(38, 166, 154, 0.2);
  border-color: #26a69a;
}

/* Fill input */
.hukyu-fill {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hukyu-fill-input {
  flex: 1;
  font-family: 'Noto Serif JP', serif;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e8f5e9;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
}

.hukyu-fill-input::placeholder {
  color: rgba(232, 245, 233, 0.5);
}

.hukyu-fill-input:focus {
  outline: none;
  border-color: #26a69a;
  box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.2);
}

/* Image choices */
.hukyu-image-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hukyu-image-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hukyu-image-btn:hover {
  border-color: #26a69a;
}

.hukyu-image-placeholder {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 2rem;
  color: #80cbc4;
}

/* Feedback */
.hukyu-feedback {
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.hukyu-feedback.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hukyu-feedback-icon {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.hukyu-feedback-icon.correct {
  color: #4caf50;
  text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.hukyu-feedback-icon.incorrect {
  color: #ef5350;
  text-shadow: 0 0 20px rgba(239, 83, 80, 0.5);
}

.hukyu-feedback-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Result Page */
.hukyu-result {
  width: 100%;
  max-width: 500px;
}

.hukyu-result-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
}

.hukyu-result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #a5d6a7;
  margin: 0 0 0.3rem;
}

.hukyu-result-score {
  margin-bottom: 1.5rem;
}

.hukyu-score-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  font-weight: 600;
  color: #4db6ac;
  text-shadow: 0 0 30px rgba(77, 182, 172, 0.5);
}

.hukyu-score-total {
  font-size: 2rem;
  color: #80cbc4;
}

.hukyu-result-rank {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.hukyu-rank-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #c9a227;
  margin-bottom: 0.5rem;
}

.hukyu-rank-message {
  font-size: 1rem;
  color: #b0bec5;
}

.hukyu-result-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hukyu-book-promo {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hukyu-book-promo p {
  font-size: 0.95rem;
  color: #80cbc4;
  margin-bottom: 1rem;
}

/* Intro Animation */
.hukyu-intro {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 100;
  overflow: hidden;
}

.hukyu-intro.fade-out {
  opacity: 0;
}

.hukyu-intro-character {
  position: relative;
  perspective: 1000px;
}

.hukyu-intro-img {
  height: 80vh;
  width: auto !important;
  aspect-ratio: 500 / 707;
  opacity: 0;
  transform-style: preserve-3d;
  transform-origin: top center;
}

.hukyu-intro-img.animate {
  animation: intro-cylinder 3s ease-in-out forwards;
}

@keyframes intro-cylinder {
  0% {
    opacity: 0;
    transform: translateX(-60vw) translateY(0) rotateY(-70deg) scale(0.3);
  }
  10% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    transform: translateX(0) translateY(0) rotateY(0deg) scale(1.5);
  }
  70% {
    opacity: 1;
    transform: translateX(0) translateY(0) rotateY(0deg) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotateY(0deg) scale(1.5);
  }
}

.hukyu-intro-text {
  position: absolute;
  top: 60vh;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(77, 182, 172, 0.3);
}

.hukyu-intro-text.animate {
  animation: text-appear 2s ease-in-out forwards;
}

@keyframes text-appear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  20% {
    opacity: 1;
    transform: translateY(0);
  }
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

.hukyu-intro-q {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #4db6ac;
  text-shadow: 0 0 20px rgba(77, 182, 172, 0.5);
}

.hukyu-intro-message {
  font-size: 1.5rem;
  color: #e8f5e9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Hukyu Correct Effect */
.hukyu-correct-effect {
  position: fixed;
  bottom: 10vh;
  left: 0;
  right: 0;
  height: 60vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translateY(100%);
  transition: none;
}

.hukyu-correct-effect.show {
  animation: correct-slide-up 0.5s ease-out forwards;
}

.hukyu-correct-effect.hide {
  animation: correct-fade-out 0.3s ease-out forwards;
}

@keyframes correct-slide-up {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes correct-fade-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

.hukyu-correct-img {
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: top center;
  transform: scale(1.5);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 60%);
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 60%);
}

.hukyu-correct-text {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
  font-family: 'Yuji Syuku', serif;
  font-size: clamp(3rem, 12vw, 6rem);
  color: #4ade80;
  text-shadow:
    3px 3px 0 #166534,
    -1px -1px 0 #166534,
    1px -1px 0 #166534,
    -1px 1px 0 #166534,
    0 0 30px rgba(74, 222, 128, 0.8),
    0 0 60px rgba(74, 222, 128, 0.5);
  white-space: nowrap;
  z-index: 60;
  letter-spacing: 0.1em;
}

/* Hukyu Sound Toggle */
.hukyu-sound-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(77, 182, 172, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.2s;
}

.hukyu-sound-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: #4db6ac;
}

.hukyu-sound-toggle svg {
  width: 24px;
  height: 24px;
  color: #4db6ac;
}

.hukyu-sound-toggle .icon-sound-off {
  display: none;
}

.hukyu-sound-toggle.muted .icon-sound-on {
  display: none;
}

.hukyu-sound-toggle.muted .icon-sound-off {
  display: block;
  color: #ef5350;
}

/* Responsive */
@media (max-width: 600px) {
  .hukyu-title {
    font-size: 2.5rem;
  }

  .hukyu-question-card {
    padding: 1.5rem;
  }

  .hukyu-image-choices {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .hukyu-fill {
    flex-direction: column;
  }

  .hukyu-fill .hukyu-btn-small {
    width: 100%;
  }

  .hukyu-intro-img {
    width: 120px;
  }

  .hukyu-intro-q {
    font-size: 2rem;
  }

  .hukyu-intro-message {
    font-size: 1.2rem;
  }
}
