:root {
  --primary-color: #FF0000;
  --secondary-color: #282828;
  --accent-color: #3EA6FF;
  --background-color: #f9f9f9;
  --text-color: #333;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  color: var(--text-color);
  line-height: 1.6;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  padding: 1.2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Room above the card for the floating mark (it rises 10px while animating). */
.header { margin-top: 22px; }

.header::before {
  content: '';
  position: absolute;
  /* Sits on the card's top edge so the mark never covers the title. */
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  background: url('images/movie-mark.svg?v=20260924-2') no-repeat center center;
  background-size: contain;
  animation: float 3s ease-in-out infinite;
}

@media (max-width: 640px) {
  .header::before { top: -20px; }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin: 2rem 0 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
}

.subtitle {
  color: var(--secondary-color);
  font-size: 1.4rem;
  margin: 1.5rem 0;
  line-height: 1.8;
}

.hero-value {
  margin-top: 1.1rem;
  margin-bottom: 0.35rem;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
  line-height: 1.5;
}

.hero-description {
  max-width: 900px;
  margin: 0.35rem auto 0.65rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.7;
}

.hero-requirements {
  max-width: 900px;
  margin: 0.35rem auto 0;
  color: #555f6a;
  font-size: .9rem;
  line-height: 1.6;
}

.hero-requirements span {
  display: inline-block;
}

/* スマホで開いた人にだけ、見るのはPCだと先に伝える */
.hero-mobile-note {
  display: none;
  max-width: 34rem;
  margin: .6rem auto 0;
  padding: .55rem .9rem;
  border-radius: 10px;
  background: #fff7e0;
  color: #6b4e00;
  font-size: .9rem;
  font-weight: 700;
}

.hero-mobile-note span {
  display: inline-block;
}

@media (max-width: 640px) {
  .hero-mobile-note {
    display: block;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.feature-card p {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.extension-announcement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 3rem;
  padding: 1.4rem 1.6rem;
  background: white;
  border: 2px solid rgba(62,166,255,0.28);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(62,166,255,0.12);
}

.extension-announcement-content {
  text-align: left;
}

.extension-announcement-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: bold;
}

.extension-announcement h2 {
  margin-bottom: 0.45rem;
  color: var(--secondary-color);
  font-size: 1.45rem;
  line-height: 1.35;
}

.extension-announcement p {
  color: #555;
  font-size: 1rem;
}

.extension-announcement-note {
  margin-top: 0.55rem;
  color: #666 !important;
  font-size: 0.92rem !important;
}

.extension-announcement-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.extension-announcement-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  background: #1a73e8;
  color: white;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(26,115,232,0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.extension-announcement-link:hover {
  transform: translateY(-2px);
  background: #1557b0;
  box-shadow: 0 6px 18px rgba(26,115,232,0.28);
}

.hero-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.9rem 0 0.2rem;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  background: #247dcc;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(36, 125, 204, .28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(36, 125, 204, .32);
}

.hero-screenshot {
  display: block;
  max-width: 820px;
  margin: 1.2rem auto 0.4rem;
}

.hero-screenshot img,
.hero-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.hero-video[hidden] { display: none; }

@media (max-width: 640px) {
  .hero-screenshot { max-width: 420px; }
}

.hero-guest-note {
  max-width: 560px;
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f4f6f9;
  color: #555f6a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.hero-guest-note strong {
  display: block;
  color: var(--secondary-color);
}

.hero-guest-note a {
  color: #1557b0;
  font-weight: bold;
  white-space: nowrap;
}

.hero-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  margin-top: 1rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(62,166,255,0.28);
  border-radius: 999px;
  background: #fff;
  color: #1557b0;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-guide-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(62,166,255,0.16);
}

.official-x-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1100px;
  min-height: 68px;
  margin: 2rem auto 2.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e1e4e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.official-x-strip-copy {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.official-x-mark {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
}

.official-x-strip p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.official-x-strip strong {
  color: var(--secondary-color);
}

.official-x-strip-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid #282828;
  border-radius: 999px;
  background: #282828;
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.official-x-strip-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

footer a {
  margin: 0 1rem;
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--primary-color);
}

.mascot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 150px;
  height: 150px;
  background: url('images/miru/full.png') no-repeat center center;
  background-size: contain;
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
  z-index: 1000;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.mascot-speech {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: white;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
  max-width: 200px;
  display: none;
}

.mascot:hover .mascot-speech {
  display: block;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .extension-announcement {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.2rem;
  }

  .extension-announcement-content {
    text-align: center;
  }

  .extension-announcement-link {
    width: 100%;
    min-width: 0;
  }

  .extension-announcement-actions {
    width: 100%;
  }

  .official-x-strip {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .official-x-strip-link {
    width: 100%;
    min-height: 48px;
  }

  .mascot {
    display: none;
  }
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1001;
}

.skip-link:focus {
  top: 6px;
}



/* 管理者だけにCallable確認後表示する旧作成導線 */
#adminTools {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  gap: 0.5rem;
}

#adminTools button {
  background: linear-gradient(45deg, #ff6b35, #ff8c42);
  color: white;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255,107,53,0.2);
}

#adminTools button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,53,0.3);
}

/* Print styles */
@media print {
  .mascot,
  .skip-link {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .feature-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Link hover effects */
.subtitle a:hover {
  text-decoration: underline !important;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.watch-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.watch-guide-link {
  display: block;
  padding: 1.2rem;
  border: 1px solid #eee;
  border-radius: 10px;
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.watch-guide-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.watch-mode-choice,
.public-watch-recovery {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}

.public-watch-recovery {
  padding: 1.25rem 1.35rem;
  border: 1px solid #e6a11a;
  border-radius: 14px;
  background: #fff8e8;
  box-shadow: 0 5px 18px rgba(105, 70, 0, .08);
}

.public-watch-recovery[hidden] {
  display: none;
}

.public-watch-recovery-label {
  display: block;
  margin-bottom: .35rem;
  color: #9a5a00;
  font-size: .82rem;
  font-weight: 800;
}

.public-watch-recovery h2,
.public-watch-recovery p {
  margin: 0;
}

.public-watch-recovery h2 {
  color: var(--secondary-color);
  font-size: 1.35rem;
}

.public-watch-recovery p {
  margin-top: .45rem;
  color: #5d4420;
}

.public-watch-recovery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.public-watch-recovery-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1rem;
  border: 1px solid #d39a38;
  border-radius: 9px;
  background: #fff;
  color: #5c3b00;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.public-watch-recovery-action--primary {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
}

.watch-mode-choice {
  text-align: center;
}

.watch-mode-choice-heading {
  max-width: 720px;
  margin: 0 auto 1.35rem;
}

.watch-mode-choice-heading h2,
.watch-mode-choice-heading p {
  margin: 0;
}

.watch-mode-choice-heading h2 {
  color: var(--secondary-color);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.35;
}

.watch-mode-card-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #1662a8;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.watch-mode-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.2rem;
  text-align: left;
}

.watch-mode-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 310px;
  padding: 1.5rem;
  border: 2px solid transparent;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .05);
}

.watch-mode-card--friends {
  border-color: rgba(62, 166, 255, .32);
  background: linear-gradient(135deg, #fff 0%, #eef8ff 100%);
}

.watch-mode-card--minna {
  min-height: 0;
  border-color: #e3e7ec;
  background: #fff;
}

.watch-mode-card--minna .watch-mode-card-label {
  color: var(--primary-color);
}

.home-screenings {
  display: grid;
  gap: .55rem;
  margin: 1rem 0 1.1rem;
}

.home-screening {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.home-screening:hover strong {
  color: var(--primary-color);
}

.home-screening .public-watch-room-artwork {
  border: 0;
  border-radius: 8px;
}

.home-screenings-heading {
  margin: .35rem 0 0;
  color: #526173;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.home-screenings-heading:first-child {
  margin-top: 0;
}

.home-screenings-heading--live {
  color: var(--primary-color);
}

.home-screening--live .public-watch-room-artwork {
  box-shadow: 0 0 0 2px var(--primary-color);
}

.home-screening span {
  display: block;
  font-weight: 800;
}

.home-screening--live span {
  color: var(--primary-color);
  font-size: .76rem;
}

.home-screening--upcoming span {
  color: var(--secondary-color);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.home-screening-hearts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: .2rem;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  background: #fdecec;
  color: #b0000a;
  font-size: .82rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.6;
}

.home-screening-hearts b {
  color: #d0000c;
  font-size: 1.05rem;
  line-height: 1;
}

.home-screening small {
  display: block;
  color: #16804b;
  font-size: .76rem;
  font-weight: 700;
}

.home-screening strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--secondary-color);
  font-size: .9rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.watch-mode-card h3 {
  margin: .45rem 0 .4rem;
  color: var(--secondary-color);
  font-size: 1.45rem;
  line-height: 1.4;
}

.watch-mode-card > p {
  margin: 0;
  color: #555f6a;
}

.watch-mode-card ul {
  display: grid;
  gap: .45rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  color: #374151;
  font-size: .92rem;
  list-style: none;
}

.watch-mode-card li {
  position: relative;
  padding-left: 1.35rem;
}

.watch-mode-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16804b;
  font-weight: 900;
}

.watch-mode-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: auto;
  padding: .8rem 1rem;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.watch-mode-action:hover {
  transform: translateY(-2px);
}

.watch-mode-action--friends {
  background: #247dcc;
  box-shadow: 0 4px 14px rgba(36, 125, 204, .2);
}

.watch-mode-action--minna {
  border: 2px solid var(--primary-color);
  background: #fff;
  color: var(--primary-color);
}

.watch-mode-action--minna:hover {
  background: #fff4f4;
}

.watch-mode-action-note {
  margin: auto 0 .45rem;
  color: #486174;
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}

.watch-mode-action-note + .watch-mode-action {
  margin-top: 0;
}

.public-watch-room-artwork {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  border-bottom: 1px solid #eee;
  background: #f7f7f7;
}

.public-watch-room-artwork img {
  min-height: 0;
  min-width: 0;
  object-position: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-watch-room-artwork-platform-logo img {
  object-fit: contain;
}

.public-watch-room-artwork.public-watch-room-cover {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f5f7;
  color: #333;
  border-bottom: 1px solid #eee;
}
.public-watch-room-cover[data-platform="amazon_prime"] { background: #edf6fa; }
.public-watch-room-cover[data-platform="netflix"] { background: #faf1f2; }
.public-watch-room-cover[data-platform="disney_plus"] { background: #f1f3fa; }
.public-watch-room-cover img.public-watch-room-cover-logo {
  flex: 0 0 44px;
  align-self: center;
  width: 112px;
  max-width: 100%;
  height: 44px;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  object-fit: contain;
}
.public-watch-room-cover .public-watch-room-cover-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: auto 0;
  max-height: 3.9em;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .header {
    padding: 1rem;
  }

  .hero-value {
    margin-top: .85rem;
  }

  .public-watch-recovery-actions {
    grid-template-columns: 1fr;
  }

  .watch-mode-grid {
    grid-template-columns: 1fr;
  }

  .watch-mode-card {
    min-height: 0;
    padding: 1.25rem;
  }

}
