/*
Theme Name: Magic Portal
Description: マジックポータル専用テーマ。ダークネイビー×ゴールドのマジックらしい配色のポータルデザイン。
Version: 1.0.0
Author: クラケン / Claude
Text Domain: magicportal
*/

:root {
	--mp-navy: #0d1230;
	--mp-navy-2: #171d42;
	--mp-gold: #d4af37;
	--mp-gold-light: #f0d778;
	--mp-text: #2a2a33;
	--mp-text-light: #6b6b78;
	--mp-bg: #f7f6f2;
	--mp-card: #ffffff;
	--mp-border: #e5e2d9;
	--mp-radius: 10px;
	--mp-shadow: 0 2px 12px rgba(13, 18, 48, 0.08);
}

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

body {
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
	color: var(--mp-text);
	background: var(--mp-bg);
	line-height: 1.8;
	font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: #1a4f9c; }

/* ---------- Header ---------- */
.mp-header {
	background: var(--mp-navy);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.mp-header-inner {
	max-width: 1120px; margin: 0 auto; padding: 0 16px;
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.mp-logo {
	font-size: 22px; font-weight: 700; padding: 14px 0;
	color: var(--mp-gold-light); text-decoration: none; letter-spacing: .05em;
}
.mp-logo .mp-logo-sub { display: block; font-size: 11px; color: #b9bdd4; font-weight: 400; letter-spacing: .15em; }
.mp-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.mp-nav a {
	color: #e8e9f2; text-decoration: none; font-size: 14px;
	padding: 10px 12px; border-radius: 6px; transition: background .2s;
	white-space: nowrap;
}
.mp-nav a:hover { background: rgba(212, 175, 55, .18); color: var(--mp-gold-light); }

/* ---------- Hero ---------- */
.mp-hero {
	background: linear-gradient(135deg, var(--mp-navy) 0%, #232a5c 60%, #3b2d63 100%);
	color: #fff; text-align: center; padding: 64px 16px 72px;
	position: relative; overflow: hidden;
}
.mp-hero::before {
	content: "✦"; position: absolute; top: 18%; left: 12%; color: rgba(240,215,120,.35); font-size: 22px;
}
.mp-hero::after {
	content: "✦"; position: absolute; bottom: 22%; right: 14%; color: rgba(240,215,120,.25); font-size: 30px;
}
.mp-hero h1 { font-size: 34px; letter-spacing: .06em; margin-bottom: 12px; }
.mp-hero h1 .gold { color: var(--mp-gold-light); }
.mp-hero p { color: #c9cce0; max-width: 640px; margin: 0 auto; font-size: 15px; }

/* ---------- Layout ---------- */
.mp-container { max-width: 1120px; margin: 0 auto; padding: 32px 16px 64px; }
.mp-section { margin-bottom: 48px; }
.mp-section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	border-bottom: 3px solid var(--mp-gold); padding-bottom: 8px; margin-bottom: 20px;
}
.mp-section-head h2 { font-size: 22px; color: var(--mp-navy); }
.mp-section-head .more { font-size: 13px; text-decoration: none; color: var(--mp-text-light); }
.mp-section-head .more:hover { color: var(--mp-gold); }

/* ---------- Cards ---------- */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.mp-card {
	background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
	padding: 18px 20px; box-shadow: var(--mp-shadow); display: flex; flex-direction: column;
	transition: transform .15s, box-shadow .15s;
}
.mp-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,18,48,.14); }
.mp-card h3 { font-size: 16px; margin-bottom: 8px; line-height: 1.5; }
.mp-card h3 a { color: var(--mp-navy); text-decoration: none; }
.mp-card h3 a:hover { color: var(--mp-gold); }
.mp-card .mp-meta { font-size: 13px; color: var(--mp-text-light); margin-bottom: 8px; }
.mp-card .mp-meta span { display: inline-block; margin-right: 10px; }
.mp-card .mp-excerpt { font-size: 13.5px; color: #4a4a55; flex: 1; }
.mp-badge {
	display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 20px;
	background: var(--mp-navy); color: var(--mp-gold-light); margin-bottom: 8px; align-self: flex-start;
}
.mp-badge.alt { background: #7a4b9c; color: #fff; }

/* ---------- Section link tiles (front page) ---------- */
.mp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mp-tile {
	background: var(--mp-navy); color: #fff; border-radius: var(--mp-radius);
	text-align: center; padding: 22px 10px; text-decoration: none;
	transition: background .2s, transform .15s;
}
.mp-tile:hover { background: #232a5c; transform: translateY(-2px); }
.mp-tile .icon { font-size: 30px; display: block; margin-bottom: 8px; }
.mp-tile .label { font-size: 14px; font-weight: 600; color: var(--mp-gold-light); }

/* ---------- Calendar ---------- */
.mp-calendar { margin: 20px 0; }
.mp-cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mp-cal-nav strong { font-size: 20px; color: var(--mp-navy); }
.mp-cal-table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.mp-cal-table th { background: var(--mp-navy); color: #fff; padding: 8px 4px; font-size: 13px; }
.mp-cal-table th.sun { color: #ff9a9a; }
.mp-cal-table th.sat { color: #9ab8ff; }
.mp-cal-table td {
	border: 1px solid var(--mp-border); vertical-align: top;
	height: 86px; padding: 4px; font-size: 12px;
}
.mp-cal-table td .daynum { font-weight: 600; color: var(--mp-text-light); }
.mp-cal-table td.sun .daynum { color: #d33; }
.mp-cal-table td.sat .daynum { color: #36c; }
.mp-cal-table td.today { background: #fdf6de; }
.mp-cal-table td.empty { background: #fafaf7; }
.mp-cal-item {
	display: block; font-size: 11px; line-height: 1.4; margin-top: 3px;
	background: #eef1ff; border-left: 3px solid var(--mp-gold); border-radius: 3px;
	padding: 2px 4px; color: var(--mp-navy); text-decoration: none; overflow: hidden;
}
.mp-cal-item:hover { background: #e0e6ff; }
.mp-cal-legend { font-size: 12px; color: var(--mp-text-light); margin-top: 8px; }

/* ---------- Forms ---------- */
.mp-form { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: 24px; box-shadow: var(--mp-shadow); }
.mp-form label { font-size: 14px; font-weight: 600; color: var(--mp-navy); }
.mp-form .req { color: #c33; font-size: 11px; margin-left: 6px; font-weight: 400; }
.mp-form input[type="text"], .mp-form input[type="url"], .mp-form input[type="email"], .mp-form textarea, .mp-form select {
	width: 100%; padding: 10px 12px; border: 1px solid #ccc9bd; border-radius: 6px;
	font-size: 15px; margin-top: 4px; font-family: inherit; background: #fdfdfb;
}
.mp-form p { margin-bottom: 14px; }
.mp-btn {
	background: var(--mp-gold); color: var(--mp-navy); font-weight: 700; font-size: 15px;
	border: none; border-radius: 6px; padding: 12px 32px; cursor: pointer; transition: background .2s;
}
.mp-btn:hover { background: var(--mp-gold-light); }
.mp-form-done { background: #e8f6e8; border: 1px solid #9ed49e; color: #1d6b1d; padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; }
.mp-form-err { background: #fdeaea; border: 1px solid #e4a0a0; color: #a02525; padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; }

/* newsletter */
.mp-newsletter-cta {
	background: linear-gradient(135deg, var(--mp-navy), #2c2255); border-radius: var(--mp-radius);
	padding: 36px 28px; text-align: center; color: #fff;
}
.mp-newsletter-cta h2 { color: var(--mp-gold-light); margin-bottom: 8px; font-size: 22px; border: none; }
.mp-newsletter-cta p { color: #c9cce0; font-size: 14px; margin-bottom: 16px; }
.mp-newsletter { background: transparent; border: none; box-shadow: none; padding: 0; max-width: 480px; margin: 0 auto; }
.mp-newsletter-row { display: flex; gap: 8px; }
.mp-newsletter-row input { flex: 1; }
.mp-newsletter-note { font-size: 12px; color: #a9add0; margin-top: 10px; }

/* ---------- Single / Page ---------- */
.mp-main { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: 32px; box-shadow: var(--mp-shadow); }
.mp-main h1.entry-title { font-size: 26px; color: var(--mp-navy); margin-bottom: 16px; line-height: 1.5; }
.mp-entry-content { font-size: 15.5px; }
.mp-entry-content h2 { font-size: 21px; color: var(--mp-navy); border-left: 5px solid var(--mp-gold); padding-left: 12px; margin: 32px 0 14px; }
.mp-entry-content h3 { font-size: 17px; color: var(--mp-navy); margin: 24px 0 10px; }
.mp-entry-content p { margin-bottom: 16px; }
.mp-entry-content ul, .mp-entry-content ol { margin: 0 0 16px 24px; }
.mp-meta-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 14.5px; }
.mp-meta-table th { background: #f2f0e8; width: 130px; text-align: left; padding: 10px 14px; border: 1px solid var(--mp-border); color: var(--mp-navy); }
.mp-meta-table td { padding: 10px 14px; border: 1px solid var(--mp-border); }
.mp-single-actions { margin: 20px 0; }
.mp-single-actions .mp-btn { display: inline-block; text-decoration: none; margin-right: 10px; }
.mp-post-date { color: var(--mp-text-light); font-size: 13px; margin-bottom: 16px; }

/* archive submit CTA */
.mp-archive-cta {
	margin-top: 32px; background: #fdf8e7; border: 1px dashed var(--mp-gold);
	border-radius: var(--mp-radius); padding: 20px 24px; text-align: center; font-size: 14px;
}
.mp-archive-cta a { font-weight: 700; color: var(--mp-navy); }

/* pagination */
.mp-pagination { margin-top: 28px; text-align: center; }
.mp-pagination .page-numbers {
	display: inline-block; padding: 8px 14px; background: #fff; border: 1px solid var(--mp-border);
	border-radius: 6px; margin: 0 3px; text-decoration: none; color: var(--mp-navy); font-size: 14px;
}
.mp-pagination .page-numbers.current { background: var(--mp-navy); color: var(--mp-gold-light); }

/* ---------- Footer ---------- */
.mp-footer { background: var(--mp-navy); color: #b9bdd4; margin-top: 40px; }
.mp-footer-inner { max-width: 1120px; margin: 0 auto; padding: 36px 16px; }
.mp-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 24px; }
.mp-footer h4 { color: var(--mp-gold-light); font-size: 14px; margin-bottom: 10px; }
.mp-footer ul { list-style: none; }
.mp-footer li { margin-bottom: 6px; }
.mp-footer a { color: #b9bdd4; text-decoration: none; font-size: 13px; }
.mp-footer a:hover { color: var(--mp-gold-light); }
.mp-copy { text-align: center; font-size: 12px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.mp-hero h1 { font-size: 24px; }
	.mp-header-inner { flex-direction: column; align-items: flex-start; }
	.mp-nav { overflow-x: auto; width: 100%; padding-bottom: 8px; flex-wrap: nowrap; }
	.mp-cal-table td { height: 64px; }
	.mp-cal-item { white-space: nowrap; text-overflow: ellipsis; }
	.mp-main { padding: 20px 16px; }
	.mp-newsletter-row { flex-direction: column; }
}
