/*
Theme Name: Mionela
Theme URI: https://mionela.com/
Author: Mionela編集部
Description: 公式情報から無料・低価格の文化イベントを探せる軽量テーマ。
Version: 0.2.1
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: mionela
*/

:root {
  --mio-bg: #f4f4f1;
  --mio-surface: #fff;
  --mio-ink: #222;
  --mio-muted: #6a6a6a;
  --mio-line: #d9d9d4;
  --mio-red: #ba1f2d;
  --mio-blue: #175e9b;
  --mio-green: #21855b;
  --mio-yellow: #fff7d6;
  --mio-width: 1120px;
  --mio-radius: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mio-ink);
  background: var(--mio-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--mio-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mio-red); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 100000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px; clip: auto; background: #fff; }

.site-header { background: var(--mio-surface); border-top: 4px solid var(--mio-red); border-bottom: 1px solid var(--mio-line); }
.site-header__inner { width: min(calc(100% - 28px), var(--mio-width)); margin: 0 auto; padding: 18px 0 14px; display: flex; align-items: flex-end; gap: 22px; justify-content: space-between; }
.site-branding { min-width: 0; }
.site-title { margin: 0; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1; letter-spacing: .04em; font-weight: 900; }
.site-title a { color: #181818; text-decoration: none; }
.site-title__dot { color: var(--mio-red); }
.site-description { margin: 8px 0 0; color: var(--mio-muted); font-size: .82rem; line-height: 1.5; }
.site-nav { background: #202020; }
.site-nav__inner { width: min(100%, var(--mio-width)); margin: 0 auto; }
.site-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 10px 15px; color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; border-right: 1px solid #3b3b3b; }
.site-nav a:hover { background: var(--mio-red); }

.site-main-wrap { width: min(calc(100% - 40px), 1180px); margin: 22px auto 36px; display: block; }
.site-main { min-width: 0; }
.panel { background: var(--mio-surface); border: 1px solid var(--mio-line); border-radius: var(--mio-radius); box-shadow: 0 1px 2px rgba(0,0,0,.035); }
.section-heading { margin: 0; padding: 11px 14px; border-left: 5px solid var(--mio-red); border-bottom: 1px solid var(--mio-line); font-size: 1.05rem; line-height: 1.4; background: #fafaf8; }
.home-intro { margin-bottom: 18px; padding: 14px 16px; font-size: .88rem; color: #444; background: var(--mio-yellow); border: 1px solid #eadc9d; border-radius: var(--mio-radius); }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-card { display: grid; grid-template-columns: 156px minmax(0,1fr); gap: 14px; padding: 15px; border-bottom: 1px solid var(--mio-line); }
.post-card:last-child { border-bottom: 0; }
.post-card__image { aspect-ratio: 16 / 10; background: #e8e8e3; overflow: hidden; border-radius: 3px; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #858580; font-weight: 800; font-size: .75rem; letter-spacing: .08em; }
.post-card__title { margin: 2px 0 7px; font-size: 1.08rem; line-height: 1.5; }
.post-card__title a { color: #202020; text-decoration: none; }
.post-card__title a:hover { color: var(--mio-red); text-decoration: underline; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--mio-muted); font-size: .75rem; }
.post-card__excerpt { margin: 7px 0 0; color: #515151; font-size: .84rem; line-height: 1.65; }
.content-badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1.6; color: #fff; background: var(--mio-blue); vertical-align: middle; }
.content-badge--fiction { background: #6d3aa8; }
.content-badge--summary { background: var(--mio-green); }

.sidebar { display: grid; gap: 16px; }
.widget { padding: 0 13px 13px; background: var(--mio-surface); border: 1px solid var(--mio-line); border-radius: var(--mio-radius); }
.widget-title { margin: 0 -13px 10px; padding: 9px 12px; color: #fff; background: #333; font-size: .92rem; line-height: 1.4; }
.widget ul { margin: 0; padding-left: 1.15rem; }
.widget li { margin: 5px 0; font-size: .84rem; line-height: 1.55; }
.widget a { color: #333; text-decoration: none; }
.widget a:hover { color: var(--mio-red); text-decoration: underline; }
.ranking-list { list-style: none; padding: 0 !important; counter-reset: ranking; }
.ranking-list li { display: grid; grid-template-columns: 25px 1fr; gap: 7px; align-items: start; }
.ranking-list li::before { counter-increment: ranking; content: counter(ranking); display: grid; place-items: center; width: 22px; height: 22px; color: #fff; background: var(--mio-red); border-radius: 2px; font-size: .72rem; font-weight: 900; }

.article { padding: clamp(18px, 3vw, 34px); }
.article-header { border-bottom: 3px double var(--mio-line); margin-bottom: 22px; padding-bottom: 16px; }
.article-title { margin: 7px 0 12px; font-size: clamp(1.45rem, 3.5vw, 2rem); line-height: 1.48; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 15px; color: var(--mio-muted); font-size: .78rem; }
.article-content { overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content h2 { margin: 2.2em 0 .8em; padding: 9px 12px; border-left: 5px solid var(--mio-red); background: #f4f4f1; font-size: 1.25rem; line-height: 1.5; }
.article-content h3 { margin: 1.8em 0 .7em; padding-bottom: 6px; border-bottom: 2px solid var(--mio-line); font-size: 1.1rem; }
.article-content blockquote { margin: 1.5em 0; padding: 12px 15px; background: #f7f7f5; border-left: 4px solid #999; }
.article-content a { overflow-wrap: anywhere; }
.mio-notice { margin: 0 0 20px; padding: 12px 14px; border-radius: 4px; font-size: .88rem; line-height: 1.65; }
.mio-notice--summary { background: #eef8f2; border: 1px solid #b8dfc9; }
.mio-notice--fiction { background: #f6effc; border: 1px solid #d9c0ed; }
.mio-source { margin-top: 28px; padding: 13px 14px; background: #f7f7f5; border: 1px solid var(--mio-line); font-size: .83rem; }
.mio-res { margin: 14px 0; padding: 12px 14px; background: #f8f8f6; border: 1px solid #deded8; border-left: 4px solid #777; border-radius: 3px; }
.mio-res--reply { margin-left: clamp(12px, 4vw, 40px); background: #f3f5f4; }
.mio-res__head { margin-bottom: 6px; color: var(--mio-green); font-weight: 800; font-size: .82rem; }
.mio-res--red { border-left-color: var(--mio-red); }
.mio-res--blue { border-left-color: var(--mio-blue); }
.mio-res strong { color: var(--mio-red); }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.nav-links a, .nav-links span { display: inline-block; min-width: 38px; padding: 5px 10px; text-align: center; background: #fff; border: 1px solid var(--mio-line); text-decoration: none; }

.mio-form { max-width: 700px; }
.mio-form p { margin: 0 0 16px; }
.mio-form label { display: block; margin-bottom: 5px; font-weight: 800; }
.mio-form input[type="text"], .mio-form input[type="email"], .mio-form select, .mio-form textarea { width: 100%; padding: 10px 11px; color: #222; background: #fff; border: 1px solid #aaa; border-radius: 3px; font: inherit; }
.mio-form textarea { min-height: 190px; resize: vertical; }
.mio-form button { min-height: 46px; padding: 9px 22px; color: #fff; background: var(--mio-red); border: 0; border-radius: 3px; font: inherit; font-weight: 900; cursor: pointer; }
.mio-form button:hover { background: #8f1722; }
.mio-form__hp { position: absolute !important; left: -9999px !important; }
.mio-form-message { padding: 10px 12px; border-radius: 3px; }
.mio-form-message--success { background: #eaf7ef; border: 1px solid #9ed1b3; }
.mio-form-message--error { background: #fff0f0; border: 1px solid #e3aaaa; }

.site-footer { color: #ddd; background: #242424; }
.site-footer__inner { width: min(calc(100% - 28px), var(--mio-width)); margin: 0 auto; padding: 26px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 0 0 14px; padding: 0; list-style: none; }
.footer-links a { color: #fff; font-size: .82rem; }
.site-footer p { margin: 5px 0; color: #bdbdbd; font-size: .76rem; }

@media (max-width: 860px) {
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-header__inner { align-items: flex-start; padding-top: 14px; }
  .site-description { max-width: 28em; }
  .site-nav a { padding: 9px 11px; font-size: .78rem; }
  .site-main-wrap { width: min(calc(100% - 24px), 1180px); margin-top: 12px; }
  .post-card { grid-template-columns: 104px minmax(0,1fr); gap: 10px; padding: 11px; }
  .post-card__title { margin-top: 0; font-size: .96rem; }
  .post-card__excerpt { display: none; }
  .sidebar { grid-template-columns: 1fr; }
  .article { padding: 17px 14px 24px; }
  .article-title { font-size: 1.38rem; }
}

/* Event platform */
body.home {
  --event-ink: #142a4f;
  --event-muted: #5d6878;
  --event-paper: #fffdf7;
  --event-cream: #f7f1e5;
  --event-line: #dcd6ca;
  --event-coral: #f2604f;
  --event-coral-dark: #c84034;
  --event-gold: #f4b52d;
  --event-navy: #153d75;
  background: var(--event-paper);
  color: var(--event-ink);
}
.site-header { background: rgba(255,253,247,.97); border-top: 0; position: sticky; top: 0; z-index: 20; }
.site-header__inner { min-height: 84px; padding: 12px 0; align-items: center; }
.site-brand { display: flex; align-items: center; gap: 12px; color: #142a4f; text-decoration: none; }
.site-brand img { width: 48px; height: 48px; object-fit: contain; }
.site-brand span { display: grid; line-height: 1.2; }
.site-brand strong { font-family: Georgia, "Yu Mincho", serif; font-size: 1.4rem; letter-spacing: .03em; }
.site-brand small { margin-top: 4px; color: #5d6878; font-size: .72rem; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; background: transparent; }
.site-nav a { padding: 5px 0; color: #142a4f; border: 0; font-size: .88rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #c84034; background: transparent; }
body.home .site-main-wrap { width: min(calc(100% - 40px), 1180px); margin: 0 auto; display: block; }
body.home .site-main { width: 100%; }
.mionela-event-page .site-main-wrap { width: min(calc(100% - 40px), 1180px); margin: 0 auto; display: block; }
.mionela-event-page .site-main { width: 100%; }
.event-intro { max-width: 840px; padding: clamp(54px, 8vw, 100px) 0 40px; }
.event-eyebrow { margin: 0 0 8px; color: #c84034; font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
.event-intro h1, .event-finder h2, .event-newsletter h2, .event-detail h1 { font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif; line-height: 1.35; }
.event-intro h1 { margin: 0 0 20px; font-size: clamp(2.2rem, 6vw, 4.8rem); letter-spacing: -.035em; }
.event-intro > p:last-child { color: #5d6878; font-size: clamp(1rem, 2vw, 1.2rem); }
.event-finder { padding: 34px; background: #f7f1e5; border: 1px solid #dcd6ca; border-radius: 28px; }
.event-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.event-section-heading h2, .event-newsletter h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); }
#result-summary { margin: 0; color: #5d6878; font-size: .9rem; }
.event-filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 28px; }
.event-filters label { display: grid; gap: 6px; color: #5d6878; font-size: .78rem; font-weight: 700; }
.event-filters input, .event-filters select, .event-filters button { min-height: 46px; padding: 0 13px; color: #142a4f; background: #fff; border: 1px solid #dcd6ca; border-radius: 12px; font: inherit; }
.event-filters input:focus, .event-filters select:focus, .event-filters button:focus, .event-primary-link:focus-visible, .event-back-link:focus-visible { outline: 3px solid rgba(242,96,79,.28); outline-offset: 2px; }
.event-filters button { cursor: pointer; font-weight: 700; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.event-card { position: relative; display: flex; flex-direction: column; min-height: 360px; padding: 24px; background: #fff; border: 1px solid #dcd6ca; border-radius: 20px; box-shadow: 0 9px 24px rgba(20,42,79,.05); transition: transform .18s ease, box-shadow .18s ease; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(20,42,79,.10); }
.event-card__top, .event-card__bottom, .event-detail__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.event-category, .event-status { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.event-category { background: #e8eef7; color: #153d75; }
.event-status { background: #fff1d1; color: #795500; }
.event-status--cancelled, .event-status--postponed { background: #fbe3e0; color: #8f2e26; }
.event-status--sold_out { background: #eee6f8; color: #5e337e; }
.event-status--ended { background: #e7e9ec; color: #4c5560; }
.event-card h3 { margin: 18px 0 12px; font-size: 1.3rem; line-height: 1.45; }
.event-card__link { color: #142a4f; text-decoration: none; }
.event-card__link::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.event-card__date { margin: 0; color: #c84034; font-weight: 800; }
.event-card__place { margin: 2px 0 0; color: #5d6878; font-size: .86rem; }
.event-card__summary { color: #5d6878; font-size: .91rem; }
.event-card__bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid #dcd6ca; }
.event-card__price { font-weight: 800; }
.event-card__cue { color: #c84034; font-size: .8rem; font-weight: 800; }
.event-empty { display: grid; padding: 56px 16px; color: #5d6878; text-align: center; }
.event-newsletter { margin: 42px 0 72px; padding: 38px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; background: #153d75; border-radius: 24px; }
.event-newsletter .event-eyebrow { color: #ffd470; }
.event-newsletter p { margin-bottom: 0; color: #d9e3f1; }
.event-primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; color: #fff; background: #f2604f; border-radius: 12px; text-decoration: none; font-weight: 800; white-space: nowrap; }
.event-primary-link:hover { color: #fff; background: #c84034; }
.event-detail-section { padding: 52px 0 80px; max-width: 900px; margin: 0 auto; }
.event-back-link { color: #c84034; font-size: .9rem; font-weight: 800; text-decoration: none; }
.event-detail { margin-top: 28px; padding: clamp(28px, 5vw, 52px); background: #fff; border: 1px solid #dcd6ca; border-radius: 28px; box-shadow: 0 18px 45px rgba(20,42,79,.10); }
.event-detail h1 { margin: 22px 0; font-size: clamp(2rem, 5vw, 3.7rem); }
.event-detail__lead { color: #5d6878; font-size: 1.08rem; }
.event-detail__list { display: grid; margin: 32px 0; border-top: 1px solid #dcd6ca; }
.event-detail__row { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid #dcd6ca; }
.event-detail__row dt { color: #5d6878; font-size: .82rem; font-weight: 800; }
.event-detail__row dd { margin: 0; font-weight: 700; }
.event-detail__checked, .event-detail__link-note { color: #5d6878; font-size: .78rem; }
.event-information-notice { margin-top: 30px; padding: 20px; color: #514b40; background: #fff8e8; border-left: 4px solid #f4b52d; font-size: .86rem; }

@media (max-width: 900px) {
  .event-filters { grid-template-columns: repeat(2, 1fr); }
  .event-filters .wide { grid-column: 1 / -1; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-header__inner { align-items: flex-start; }
  .site-brand small { display: none; }
  .site-nav { gap: 12px; }
  body.home .site-main-wrap { width: min(calc(100% - 24px), 1180px); }
  .mionela-event-page .site-main-wrap { width: min(calc(100% - 24px), 1180px); }
  .event-intro { padding-top: 42px; }
  .event-finder { padding: 20px 14px; border-radius: 20px; }
  .event-section-heading, .event-newsletter { align-items: flex-start; flex-direction: column; }
  .event-filters, .event-grid { grid-template-columns: 1fr; }
  .event-filters .wide { grid-column: auto; }
  .event-card { min-height: 0; }
  .event-newsletter { padding: 28px 22px; }
  .event-primary-link { width: 100%; }
  .event-detail__row { grid-template-columns: 1fr; gap: 2px; }
}
