/* Visual A "manga magazine" (MANGA-VISUAL-A-20261113-01).
 * Decoration layer on top of SWELL + components.css + the registry blocks. Colors: ink/yellow; green = spoiler-free, orange = spoilers.
 * Top-page parts are switched on by "追加CSSクラス" in the editor (mq-hero-a, mq-hero-panel, mq-entry-card, mq-sticker ...). */
:root { --a-ink: #1d2326; --a-yellow: #ffd84d; --a-yellow-d: #f4b400; --a-cream: #fffbe8; --a-red: #e2462d; --a-green: #1f8a4c; --a-font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif; }

/* Display font for headings and UI (body text keeps SWELL's font). */
.c-gnav, .l-header__bar, .p-breadcrumb, .c-pageTitle, .c-postTitle__ttl, .p-postList__title, .c-categoryList__link, .l-footer, .p-spMenu, #fix_bottom_menu,
.post_content :where(h2, h3, h4), .mqb-more a, .mq-genre-entries a, .mq-entry-title, .mq-entry-tag, .mq-hero-eyebrow, .mq-hero-lead,
.wp-block-button__link, .mq-catalog-filter button, .mq-search button, .mq-result-count, .mq-advanced-filters > summary { font-family: var(--a-font); }
.post_content :where(h2, h3), .c-pageTitle, .c-postTitle__ttl, .mq-entry-title, .mq-hero-lead { font-weight: 800; }

/* Header / footer frame */
.l-header { box-shadow: none; border-bottom: 3px solid var(--a-ink); }
/* The logo is wide (about 6:1); on phones SWELL's flex header shrinks it, so give it an explicit width. */
@media (max-width: 959px) {
	.l-header__logo .c-headLogo.-img { width: min(230px, calc(100vw - 120px)); height: auto; }
	.l-header__logo .c-headLogo.-img .c-headLogo__link { display: flex; align-items: center; height: 100%; }
	.l-header__logo .c-headLogo__img { width: 100%; height: auto; max-height: 40px; }
}
.c-gnav > .menu-item > a { font-weight: 700; }
.l-footer { border-top: 3px solid var(--a-ink); }
.l-footer a { color: inherit; }

/* Buttons and links shared by the top page and lists */
.post_content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
.mqb .mqb-more a { background: var(--a-ink); color: var(--a-yellow) !important; border: 0; border-radius: 99px; box-shadow: 3px 3px 0 var(--a-yellow-d); }
.mqb .mqb-more a { padding: 10px 26px; }
.mq-search button, .mq-catalog-filter button { background: var(--a-ink) !important; color: var(--a-yellow) !important; font-weight: 800; }
.mq-search input, .mq-catalog-filter input:not([type=checkbox]), .mq-catalog-filter select { border: 2px solid var(--a-ink) !important; border-radius: 6px; }

/* Section titles: English label tag + rounded heading (SWELL "セクション見出し") */
.post_content .is-style-section_ttl { font-size: 1.45em; letter-spacing: .02em; }
.post_content .is-style-section_ttl small { display: block; width: max-content; margin: 0 auto 8px; padding: 2px 12px; border-radius: 4px; background: var(--a-ink); color: var(--a-yellow); font-size: 12px; letter-spacing: .25em; transform: rotate(-2deg); }

/* Hero: yellow, halftone dots and speed lines, comic-panel text box */
.post_content .mq-hero-a { position: relative; overflow: hidden; margin-top: 0; margin-bottom: 2.5em; padding: 48px 20px; border-bottom: 3px solid var(--a-ink);
	background: radial-gradient(circle, var(--a-yellow-d) 1.6px, transparent 1.8px) 0 0 / 12px 12px, repeating-conic-gradient(from 0deg at 78% 50%, rgba(255,255,255,.55) 0deg 4deg, transparent 4deg 13deg), var(--a-yellow); }
.post_content .mq-hero-a > * { position: relative; max-width: 960px; margin-left: auto; margin-right: auto; }
.post_content .mq-hero-panel { padding: 22px 24px; background: #fff; border: 3px solid var(--a-ink); box-shadow: 6px 6px 0 var(--a-ink); transform: rotate(-1deg); }
.post_content .mq-hero-panel > * { transform: rotate(1deg); }
.mq-hero-eyebrow { color: var(--a-red) !important; }
.mq-hero-lead { color: var(--a-ink); }
/* English top: the English-only concept lead is two sentences, so it is set a little smaller (MANGA-EN-TOP-CONCEPT-20261113-01). */
.post_content .mq-hero-lead.mq-en-only { font-size: 18px; font-weight: 700; line-height: 1.6; }
@media (max-width: 781px) { .post_content .mq-hero-lead.mq-en-only { font-size: 16px; } }
.post_content .mq-hero-mascot img { background: none !important; box-shadow: none !important; border-radius: 0 !important; filter: drop-shadow(5px 5px 0 rgba(0,0,0,.18)); }
@media (max-width: 781px) { .post_content .mq-hero-a { padding: 26px 16px 30px; } .post_content .mq-hero-mascot img { width: 170px !important; } }

/* Entry cards: comic panels with a mascot */
.post_content .mq-entry-card { border: 3px solid var(--a-ink); border-radius: 6px; box-shadow: 5px 5px 0 var(--a-ink); background: #e8f7ec; }
.post_content .mq-entry-card--imp { background: #ffe9dc; border-color: var(--a-ink); }
.post_content .mq-entry-card .wp-block-columns { margin: 0; gap: 12px; align-items: center; }
.post_content .mq-entry-img img { width: 88px; margin: 0 auto; }
.post_content .mq-entry-tag { background: var(--a-green); border-radius: 4px; }
.post_content .mq-entry-card--imp .mq-entry-tag { background: var(--a-red); }
.post_content .mq-entry-link a { color: var(--a-ink) !important; }

/* Mascot "sticker" next to a section title */
.post_content .mq-sticker { position: relative; height: 0; margin: 0 !important; z-index: 1; }
.post_content .mq-sticker img { position: absolute; right: 6%; top: -14px; width: 96px; height: auto; }
@media (max-width: 781px) { .post_content .mq-sticker { display: none; } }

/* Registry blocks: genres (work cards are styled by the registry plugin's work-card.css) */
.mq-genre-entries a { border: 2.5px solid var(--a-ink) !important; border-radius: 99px; background: #fff; color: var(--a-ink) !important; font-weight: 700; box-shadow: 3px 3px 0 var(--a-ink); }
.mq-genre-entries a:hover { background: var(--a-yellow); }

/* Catalog (作品を探す・評価・感想) */
.mq-catalog-filter { border: 3px solid var(--a-ink) !important; border-radius: 6px !important; box-shadow: 4px 4px 0 var(--a-ink); }
.mq-score-bands span { border: 2px solid var(--a-ink) !important; }
.mq-score-bands input:checked + span { background: var(--a-ink) !important; color: var(--a-yellow) !important; }

/* About section */
.post_content .mq-about-quote { border: 3px solid var(--a-ink); border-radius: 6px; background: var(--a-cream); }
.post_content .mq-top-balloon .c-balloon__text { border: 3px solid var(--a-ink); border-radius: 22px; background: #fff; }

/* ---- Article parts (MANGA-ARTICLE-PARTS-20261113-01). Article bodies are not changed; the rating card keeps its current look. ---- */

/* Work information table (intro articles) */
.post_content .wp-block-table { padding: 0 5px 5px 0; }
.post_content .wp-block-table table { border-collapse: collapse; border: 3px solid var(--a-ink); background: #fff; box-shadow: 4px 4px 0 var(--a-ink); }
.post_content .wp-block-table :is(th, td) { border: 1.5px solid var(--a-ink); padding: 9px 12px; text-align: left; }
.post_content .wp-block-table thead th { background: var(--a-ink); color: var(--a-yellow); font-family: var(--a-font); font-weight: 800; border-color: var(--a-ink); }
.post_content .wp-block-table tbody td:first-child { width: 30%; background: #fff6cc; font-weight: 700; }

/* Mascot balloon: ink outline with a matching tail (SWELL "speaking" balloon, border on) */
.post_content .c-balloon .c-balloon__text { background: #fff; color: var(--a-ink); border: 3px solid var(--a-ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--a-ink); }
.post_content .c-balloon .-speaking.-border-on .c-balloon__after { top: 8px; border-width: 10px 15px 10px 0; border-right-color: var(--a-ink); left: -15px; }
.post_content .c-balloon .-speaking.-border-on .c-balloon__before { top: 12px; border-width: 6px 9px 6px 0; border-right-color: #fff; left: -9px; }
.post_content .c-balloon.-bln-right .-speaking.-border-on .c-balloon__after { left: auto; right: -15px; border-width: 10px 0 10px 15px; border-left-color: var(--a-ink); border-right-color: transparent; }
.post_content .c-balloon.-bln-right .-speaking.-border-on .c-balloon__before { left: auto; right: -9px; border-width: 6px 0 6px 9px; border-left-color: #fff; border-right-color: transparent; }
.post_content .c-balloon__iconName { font-family: var(--a-font); font-weight: 700; color: var(--a-ink); }

/* Link to the other article of the same work (intro <-> impressions) */
.post_content .mq-counterpart { border-top: 0; padding: 0; margin: 2em auto; max-width: 520px; }
.post_content .mq-counterpart a { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding: 10px 16px; border: 3px solid var(--a-ink); border-radius: 10px;
	background: #bfe9cc; color: var(--a-ink) !important; font-family: var(--a-font); font-weight: 800; text-align: center; text-decoration: none; box-shadow: 4px 4px 0 var(--a-ink); }
.post_content .mq-counterpart--to-imp a { background: #ffc9ad; }
.post_content .mq-counterpart a:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--a-ink); }

/* Purchase links (MANGA-BUY-BUTTON-20261126-01): inc/swell-integration.php gives the class mq-buy to a paragraph that holds one
 * Kindle / Rakuten Kobo link with nothing but "→" and spaces outside it. A store link inside a sentence stays a text link.
 * Front end only; in the editor they stay plain paragraphs. The leading "→" is hidden visually. */
body:not(.editor-styles-wrapper) .post_content p.mq-buy {
	display: flex; max-width: 520px; margin: 14px auto; font-size: 0; line-height: 0; }
body:not(.editor-styles-wrapper) .post_content p.mq-buy > a {
	display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 10px 16px; border: 3px solid var(--a-ink); border-radius: 10px;
	background: #fff; color: var(--a-ink) !important; font: 800 16px/1.4 var(--a-font); text-align: center; text-decoration: none; box-shadow: 4px 4px 0 var(--a-ink); }
body:not(.editor-styles-wrapper) .post_content p.mq-buy > a:is([href*="amazon.co.jp/"], [href*="amzn.to/"]) { background: var(--a-yellow); }
body:not(.editor-styles-wrapper) .post_content p.mq-buy > a::after { content: "→"; margin-left: .5em; }
body:not(.editor-styles-wrapper) .post_content p.mq-buy > a:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--a-ink); }

/* Rakuten Web Service credit: keep it, small and centered */
.post_content > a[href*="developers.rakuten.com"] { display: block; width: max-content; max-width: 100%; margin: 10px auto 1.5em; font-size: 12px; color: #52665e; }

/* "次に読む作品" (SWELL widget area 記事下部 / single_bottom) */
.mq-next { margin: 2.5em 0 1em; }
.mq-next .mq-next__title { margin: 0 0 18px; padding: 0; border: 0; background: none; color: var(--a-ink); font-family: var(--a-font); font-size: 1.35em; font-weight: 800; line-height: 1.5; text-align: center; }
.mq-next .mq-next__title::before, .mq-next .mq-next__title::after { display: none; }
.mq-next .mq-next__title small { display: block; width: max-content; margin: 0 auto 8px; padding: 2px 12px; border-radius: 4px; background: var(--a-ink); color: var(--a-yellow); font-size: 12px; letter-spacing: .25em; transform: rotate(-2deg); }

/* Editor canvas: keep decorations visible but allow selecting blocks */
.editor-styles-wrapper .mq-hero-panel, .editor-styles-wrapper .mq-hero-panel > * { transform: none; }
