/* シェイクスピアごっこ - メインスタイル */
:root {
  --color-bg: #1a1a1a;
  --color-text: #f0e6d8;
  --color-accent: #c9a227;
  --color-accent-hover: #d4b030;
  --color-border: #444;
  --font-sans: "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

#app {
  min-height: 100vh;
}

.screen {
  padding: 1rem;
  min-height: 100vh;
}

.screen__lead {
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.screen--hidden {
  display: none;
}

.screen:not(.screen--hidden) {
  display: block;
}

h1 {
  font-size: 1.5rem;
  margin-top: 0;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}

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

.btn--primary {
  background: var(--color-accent);
  color: #1a1a1a;
}

.btn--primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

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

.btn--secondary:hover {
  background: rgba(201, 162, 39, 0.15);
}

/* S1 写真入力 */
.photo-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.photo-input__label {
  font-weight: bold;
}

.photo-input__file {
  font-size: 0.9rem;
}

.photo-input__name {
  font-size: 0.85rem;
  opacity: 0.8;
}

.photo-inputs--optional {
  margin-top: 0.5rem;
}

.photo-inputs--optional .photo-input__label {
  font-weight: normal;
}

/* S1 戯曲一覧：横長の押せるカード */
.play-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.play-list__item {
  margin: 0;
  flex: 1 1 auto;
  min-width: 140px;
  max-width: 100%;
}

.play-list__card {
  display: block;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  font-weight: 500;
}

.play-list__card:hover {
  border-color: var(--color-accent);
  background: rgba(201, 162, 39, 0.08);
}

.play-list__item input:checked + .play-list__card,
.play-list__item input:focus-visible + .play-list__card {
  border-color: var(--color-accent);
  background: rgba(201, 162, 39, 0.15);
  color: var(--color-accent);
}

.play-list__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.play-list__item label {
  display: block;
  cursor: pointer;
  margin: 0;
}

/* S3 結果 */
.result-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.result-photos__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.result-photos__canvas {
  max-width: 100%;
  width: 280px;
  height: auto;
  border: 2px solid var(--color-border);
  border-radius: 4px;
}

.result-photos__name {
  font-weight: bold;
  color: var(--color-accent);
}

.dialogue {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.dialogue__lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialogue__line {
  border-left: 3px solid var(--color-accent);
  padding-left: 0.75rem;
}

.dialogue__speaker {
  display: block;
  font-weight: bold;
  margin-bottom: 0.25rem;
  color: var(--color-accent);
}

.dialogue__text {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.dialogue__text--en {
  font-size: 0.9rem;
  opacity: 0.85;
  font-style: italic;
}

.learning {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(201, 162, 39, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.learning__title {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  color: var(--color-accent);
}

.learning__text,
.learning__quote {
  margin: 0.35rem 0;
  line-height: 1.5;
}

.learning__quote--en {
  font-style: italic;
  opacity: 0.9;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .screen {
    padding: 2rem;
    max-width: 64rem;
    margin: 0 auto;
  }

  h1 {
    font-size: 2rem;
  }

  .result-photos__canvas {
    width: 320px;
  }
}
