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

/* READING MATE design style - Image Assets Integrated */
:root {
  --color-text-main: #3b1f0d;
  --font-serif: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background: url('../images/bg_reading.png') center -30px no-repeat;
  background-size: cover;
  line-height: 1.7;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

body.page-ticket,
body.page-goods,
body.page-precautions,
body.page-contact {
  background-image: url('../images/bg_reading_sub.png');
}

body.page-ticket,
body.page-goods,
body.page-precautions,
body.page-contact {
  background-position: center top;
  background-attachment: fixed;
  background-size: cover;
}

/* Mobile: use viewport-based sizing for consistent dark area across all pages */
@media (max-width: 768px) {
  body.page-ticket,
  body.page-goods,
  body.page-precautions,
  body.page-contact {
    background-color: #ece1c4;
    background-size: 300% auto, auto;
    background-image: url('../images/bg_reading_sub.png'), url('../images/bg_reading_main.png');
    background-position: center top, center top;
    background-repeat: no-repeat, repeat-y;
    background-attachment: scroll, scroll;
  }
}

/* Wrapper for the top header background */
.bg-wrapper {
}

/* Event specific background wrapper */
.event-bg-wrapper {
  background: url('../images/bg_reading_event.png') center top repeat-y;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; margin: 0 auto; }
button, .btn { cursor: pointer; }

/* Mobile-only line break utility */
.sp-br { display: none; }
@media (max-width: 768px) {
  .sp-br { display: inline; }
}

/* Page Shell & Main Container */
.page-shell { 
  width: min(1140px, calc(100% - 40px)); 
  margin: 0 auto; 
  padding-bottom: 60px; 
}

/* Header Area */
.site-header { 
  padding: 40px 0 20px; 
  text-align: center;
}

.brand-logo a {
  display: inline-block;
  transition: opacity 0.3s ease;
}
.brand-logo a:hover {
  opacity: 0.8;
}

/* Page Header */
.page-header { 
  padding: 10px 0 40px; 
  text-align: center; 
}
.title-image {
  max-width: 400px; /* Adjust according to the actual asset size */
}

/* Tabs / Navigation */
.tab-row { 
  margin: 40px auto 20px; 
  max-width: 980px; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 16px; 
  justify-content: center; 
}

.tab-link { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  min-width: 220px;
  min-height: 60px;
  background: url('../images/btn_gnavi.png') center center / 100% 100% no-repeat;
  color: #3b1f0d; 
  font-family: var(--font-serif);
  font-weight: 700; 
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: background-image 0.2s ease; 
  text-decoration: none;
}

.tab-link:hover, .tab-link.active { 
  background-image: url('../images/btn_gnavi_ov.png');
  color: #fff;
}

/* Main Content Paper Container */
.paper-container {
  background: url('../images/bg_reading_inner.png') center top / 100% 100% no-repeat;
  padding: 80px 60px;
  margin-bottom: 40px;
  position: relative;
  min-height: 600px;
}

/* Sections */
.section { padding: 30px 0; }
.section-title { margin-bottom: 30px; text-align: center; }
.section-title-image {
  max-width: 450px;
}

/* Content Box (Used in events) */
.content-box { 
  text-align: center;
  font-family: var(--font-serif);
}

.content-box p { margin: 0 0 1rem; line-height: 2; font-size: 1.05rem; }

/* Gaiyo Box (Index Event Outline) */
.gaiyo-box {
  background: url('../images/back001.png') center top no-repeat;
  background-size: 100% 100%;
  border: 4px solid #E4B958;
  padding: 50px 40px;
  margin: 0 auto;
  max-width: 1000px;
  position: relative;
}


/* Event Banner Cards (Images) */
.card-grid { 
  display: grid; 
  gap: 40px; 
  grid-template-columns: repeat(auto-fit,minmax(350px,1fr)); 
  margin-bottom: 40px;
}

.event-card { 
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  filter: brightness(1.05);
}

.event-card img {
  width: 100%;
}

/* Info Tables */
.info-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 20px 0 0; 
  font-family: var(--font-sans);
}
.info-table th, .info-table td { 
  border: 1px solid rgba(163,129,94,0.3); 
  padding: 16px 20px; 
}
.info-table th { 
  background: rgba(163,129,94,0.1); 
  text-align: left; 
  font-weight: 700; 
  width: 25%;
}
.info-table td {
  background: rgba(255,255,255,0.6);
  text-align: left;
}

/* Forms */
.form-grid { display: grid; gap: 20px; text-align: left; }
.form-grid label { display: grid; gap: 8px; font-weight: 700; }
.form-grid input, .form-grid textarea { 
  width: 100%; 
  padding: 14px 16px; 
  border: 1px solid #a3815e; 
  border-radius: 4px; 
  background: #fdfbf8; 
  font-family: var(--font-sans);
}
.form-grid textarea { min-height: 180px; resize: vertical; }

.primary-button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 14px 40px; 
  background: var(--color-text-main); 
  color: #fff; 
  border: none;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  transition: background 0.3s;
}

.primary-button:hover {
  background: #5a3620;
}

/* Footer */
.site-footer { 
  background-color: #3b1f0d;
  padding: 50px 0 30px;
  text-align: center;
  color: #fff;
  margin-top: 80px;
}
.site-footer p { margin: 0; font-size: 0.85rem; letter-spacing: 0.05em; color: #fff; }

.footer-logo-wrap {
  text-align: center;
  margin-bottom: 30px;
}
.footer-logo-wrap img {
  max-width: 250px;
  margin: 0 auto;
}
.footer-sns-wrap {
  text-align: center;
  margin-bottom: 30px;
}
.footer-sns-link {
  display: inline-block;
  transition: opacity 0.3s;
  margin: 0 auto;
  text-decoration: none;
}
.footer-sns-link img {
  width: 50px;
  height: 50px;
  margin: 0 auto;
}

/* --- Event Page Layout --- */


.main-visual-full {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

.main-visual-full img {
  width: 100%;
  height: auto;
  display: block;
}

.youtube-section {
  background: url('../images/bg_youtube.png') center top / cover no-repeat;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 60px;
}

.youtube-dummy {
  max-width: 800px;
  margin: 0 auto;
  border: 4px solid #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.chara-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  padding: 30px 20px;
  border: 1px solid rgba(163, 129, 94, 0.5);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(59,31,13,0.05);
}

.chara-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.chara-img, .cv-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid rgba(163, 129, 94, 0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.chara-img {
  background-color: #ffffff;
}

.cv-img {
  background-color: #ffffff; /* optionally white or default */
}

.chara-info p {
  margin: 5px 0;
  font-family: var(--font-serif);
}

.chara-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text-main);
  letter-spacing: 0.05em;
}

.cv-name {
  font-size: 0.95rem;
  color: #5a3f28;
}

/* Event Content Blocks */
.event-head {
  text-align: center;
  font-size: 2.8rem;
  font-family: var(--font-serif);
  color: #4a2e1b;
  margin: 60px 0 20px;
  letter-spacing: 0.1em;
  border-bottom: 2px solid #5a3f28;
  padding-bottom: 10px;
}

.event-banner {
  background: #5a3422;
  color: #fff;
  padding: 12px 20px;
  text-align: center;
  font-weight: bold;
  border-radius: 25px;
  margin: 30px auto;
  max-width: 600px;
  font-size: 1.1rem;
  border: 1px solid #d4af37;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.info-block {
  text-align: center;
  margin-bottom: 40px;
}

.info-block h3 {
  font-size: 1.2rem;
  color: #5a3f28;
  margin-bottom: 15px;
  font-weight: bold;
  border-bottom: 1px solid #b89771;
  display: inline-block;
  padding-bottom: 5px;
}

.info-block p {
  color: #3e2723;
  line-height: 1.8;
  font-size: 1.05rem;
}

.btn-access {
  display: inline-block;
  background: #2b1100;
  color: #fff;
  padding: 12px 50px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  border: 2px solid #5a3422;
  transition: all 0.3s;
}

.btn-access:hover {
  background: #4a2105;
  color: #fff;
}

.story-box {
  background: #fff;
  padding: 60px 20px;
  border-radius: 12px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 20px auto 60px;
  max-width: 700px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.credit-banner {
  background: #5a3422;
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  margin: 30px auto 15px;
  max-width: 800px;
}

.credit-text {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1rem;
  color: #3e2723;
}

.small-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 10px;
}

/* Contact Form */
.contact-box {
  background: #fff;
  padding: 50px 40px;
  border-radius: 12px;
  margin: 30px auto 60px;
  max-width: 750px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #5a3422;
}

.contact-lead {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 40px;
  color: #3e2723;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.form-row label {
  flex: 0 0 200px;
  font-weight: bold;
  color: #3e2723;
  padding-top: 10px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  flex: 1;
  padding: 12px;
  border: 2px solid #5a3422;
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
}

.form-row textarea {
  min-height: 150px;
  resize: vertical;
}

.form-agree {
  text-align: center;
  margin: 20px 0;
}

.form-agree label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #3e2723;
}

.form-agree input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid #5a3422;
  cursor: pointer;
}

.form-agree a {
  color: #5a3422;
  text-decoration: underline;
}

.form-submit {
  text-align: center;
  margin-top: 10px;
}

.form-submit .btn-access {
  width: 300px;
  font-size: 1.1rem;
  padding: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .page-shell { width: calc(100% - 20px); }
  .paper-container { padding: 40px 20px; background-size: 100% 100%; }
  .title-image { max-width: 80%; }
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: none; }
  .info-table td { border-top: none; margin-bottom: 10px; }
  .bg-wrapper { background-size: 150% auto; }

  /* Tab buttons - 2 columns layout on mobile */
  .tab-row {
    gap: 10px !important;
    margin: 30px auto 20px !important;
    max-width: 360px !important;
  }
  .tab-link {
    min-width: 0 !important;
    width: calc(50% - 5px) !important;
    flex: 0 0 calc(50% - 5px);
    font-size: 0.9rem !important;
  }

  /* Page title banner - use SPbar.png on mobile for better text readability */
  .page-title-banner {
    background: url('../images/SPbar.png') center center / 100% 100% no-repeat;
    aspect-ratio: 831 / 116;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .page-title-banner img {
    display: none !important;
  }
  .page-title-banner h2 {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    font-size: 1.25rem !important;
    letter-spacing: 0.05em !important;
    padding: 0 14%;
    box-sizing: border-box;
    line-height: 1.25;
  }

  /* Contact form - stack label above input */
  .contact-box {
    padding: 30px 20px;
    margin: 20px auto 40px;
  }
  .contact-form {
    gap: 18px;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .form-row label {
    flex: none;
    padding-top: 0;
  }
  .form-row input[type="text"],
  .form-row input[type="email"],
  .form-row textarea {
    width: 100%;
    font-size: 16px; /* iOS zoom prevention */
  }
  .form-row textarea {
    min-height: 120px;
  }
  .form-agree label {
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
    line-height: 1.6;
  }
  .form-submit .btn-access {
    width: 100%;
    max-width: 300px;
  }
  .btn-wrap {
    flex-direction: column;
    gap: 12px !important;
  }
  .btn-wrap .btn-back,
  .btn-wrap .btn-access {
    width: 100% !important;
    max-width: 300px;
  }
  .btn-complete {
    width: 100% !important;
    max-width: 300px;
  }
  .confirm-text {
    font-size: 15px;
  }
  .complete-message {
    padding: 40px 15px;
  }
  .complete-message p {
    font-size: 16px;
  }

  /* Ticket cards - stack title and price vertically on mobile */
  body.page-ticket .ticket-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.page-ticket .ticket-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.page-ticket .ticket-title {
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    justify-content: center !important;
    text-align: center;
  }
  body.page-ticket .ticket-price {
    padding: 15px 20px !important;
    font-size: 1.3rem !important;
  }
  body.page-ticket .ticket-body {
    padding: 0 15px 20px !important;
    text-align: center;
  }
  body.page-ticket .ticket-body .bonus-badge {
    margin: 0 auto 15px !important;
  }
  body.page-ticket .ticket-body .bonus-list {
    text-align: left;
  }
  body.page-ticket .ticket-notes,
  body.page-ticket .schedule-notes {
    padding: 0 10px;
    font-size: 0.85rem !important;
  }
  body.page-ticket .schedule-box {
    padding: 20px 15px !important;
  }
  body.page-ticket .schedule-box h3 {
    font-size: 1.1rem !important;
    line-height: 1.6;
  }
  body.page-ticket .schedule-row {
    flex-direction: column !important;
  }
  body.page-ticket .schedule-label {
    width: 100% !important;
    padding: 8px !important;
  }
  body.page-ticket .schedule-value {
    padding: 10px 15px !important;
    font-size: 1rem !important;
    text-align: center !important;
    justify-content: center !important;
  }
  body.page-ticket .btn-apply {
    padding: 12px 40px !important;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
  }

  /* Goods page coming-soon box */
  body.page-goods .coming-soon-box {
    height: 250px !important;
    padding: 20px;
  }

  /* Precautions content padding */
  .precautions-list {
    padding: 20px 18px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .page-title-banner h2 {
    font-size: 1.05rem !important;
    letter-spacing: 0.02em !important;
    padding: 0 13%;
  }
  .tab-link {
    font-size: 0.85rem !important;
  }
}

/* Page Top Button */
#page-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #4a2e1b; /* 濃い茶色 */
  color: #ffffff; /* 白 */
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background-color 0.3s, transform 0.3s;
  text-align: center;
  line-height: 60px;
  display: none; /* JSでフェードイン */
}

#page-top-btn:hover {
  background-color: #2b1100;
  transform: translateY(-3px);
}
