/* KIF Magazine Theme CSS - Complete Self-Contained Offline Stylesheet */

/* --- 1. Base Reset & Root --- */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e2e8f0;
}
html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    line-height: inherit;
    background-color: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a {
    color: inherit;
    text-decoration: inherit;
}
button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
    line-height: inherit;
    color: inherit;
}
button {
    background: transparent;
    cursor: pointer;
}
ol, ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}
p {
    margin: 0;
}

/* --- 2. Offline Lucide Icons (Pure CSS Vector via mask-image) --- */
i[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    flex-shrink: 0;
}
i[data-lucide="feather"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.67 1.67a8 8 0 0 0-8.67 8.67l2.25 2.25 5.5-5.5L8.5 3.84l4.17-2.17Z'/%3E%3Cpath d='m16 8 2 2'/%3E%3Cpath d='M17.83 9.83a8 8 0 0 1-8.67 8.67l-2.25-2.25 5.5-5.5 3.25 3.25 2.17-4.17Z'/%3E%3Cpath d='m8 16-2-2'/%3E%3Cline x1='2' x2='6' y1='22' y2='18'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.67 1.67a8 8 0 0 0-8.67 8.67l2.25 2.25 5.5-5.5L8.5 3.84l4.17-2.17Z'/%3E%3Cpath d='m16 8 2 2'/%3E%3Cpath d='M17.83 9.83a8 8 0 0 1-8.67 8.67l-2.25-2.25 5.5-5.5 3.25 3.25 2.17-4.17Z'/%3E%3Cpath d='m8 16-2-2'/%3E%3Cline x1='2' x2='6' y1='22' y2='18'/%3E%3C/svg%3E");
}
i[data-lucide="menu"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' x2='20' y1='12' y2='12'/%3E%3Cline x1='4' x2='20' y1='6' y2='6'/%3E%3Cline x1='4' x2='20' y1='18' y2='18'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' x2='20' y1='12' y2='12'/%3E%3Cline x1='4' x2='20' y1='6' y2='6'/%3E%3Cline x1='4' x2='20' y1='18' y2='18'/%3E%3C/svg%3E");
}
i[data-lucide="chevron-right"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}
i[data-lucide="sparkles"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z'/%3E%3C/svg%3E");
}
i[data-lucide="library"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 6 4 14'/%3E%3Cpath d='M12 6v14'/%3E%3Cpath d='M8 8v12'/%3E%3Cpath d='M4 4v16'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 6 4 14'/%3E%3Cpath d='M12 6v14'/%3E%3Cpath d='M8 8v12'/%3E%3Cpath d='M4 4v16'/%3E%3C/svg%3E");
}
i[data-lucide="shield-check"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}
i[data-lucide="book-open"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}
i[data-lucide="rss"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
}
i[data-lucide="mail"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}

i[data-lucide="arrow-right"] {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' x2='19' y1='12' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' x2='19' y1='12' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
}

/* --- 3. Layout & Structure --- */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.my-10 { margin-top: 2.5rem; margin-bottom: 2.5rem; }

.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-none { max-width: none; }

.w-full { width: 100%; }
.w-auto { width: auto; }
.w-1\.5 { width: 0.375rem; }
.w-2 { width: 0.5rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-10 { width: 2.5rem; }
.w-20 { width: 5rem; }

.h-1\.5 { height: 0.375rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-10 { height: 2.5rem; }
.h-20 { height: 5rem; }

.min-h-screen { min-height: 100vh; }

/* Display & Flex/Grid */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Positioning */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-2 { row-gap: 0.5rem; }

.space-x-6 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 1.5rem;
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
}
.space-y-8 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 2rem;
}
.space-y-10 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 2.5rem;
}

.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-8 { padding-bottom: 2rem; }
.pl-4 { padding-left: 1rem; }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: #e2e8f0; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: #e2e8f0; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e2e8f0; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; border-left-color: #e2e8f0; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }

.border-gray-100 { border-color: #f3f4f6; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8); }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-700 { border-color: #334155; }
.border-slate-700\/60 { border-color: rgba(51, 65, 85, 0.6); }
.border-slate-800 { border-color: #1e293b; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-200\/70 { border-color: rgba(253, 230, 138, 0.7); }
.border-amber-400 { border-color: #fbbf24; }
.border-amber-400\/40 { border-color: rgba(251, 191, 36, 0.4); }
.border-amber-500 { border-color: #f59e0b; }
.border-amber-700 { border-color: #b45309; }
.border-amber-500\/40 { border-color: rgba(245, 158, 11, 0.4); }
.border-emerald-200 { border-color: #a7f3d0; }

.last\:border-0:last-child { border-width: 0; }
.last\:pb-0:last-child { padding-bottom: 0; }

/* Border Radius */
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-r-xl { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }

/* Backgrounds */
.bg-white { background-color: #ffffff; }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.98); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-50\/70 { background-color: rgba(248, 250, 252, 0.7); }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-100\/70 { background-color: rgba(241, 245, 249, 0.7); }
.bg-slate-800\/80 { background-color: rgba(30, 41, 59, 0.8); }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-50\/60 { background-color: rgba(255, 251, 235, 0.6); }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-500\/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-amber-700 { background-color: #b45309; }
.hover\:bg-amber-800:hover { background-color: #92400e; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-500 { background-color: #10b981; }

.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops, #0f172a, #1e293b, #0f172a)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops, #0f172a, #1e293b)); }
.from-slate-900 { --tw-gradient-from: #0f172a; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(15, 23, 42, 0)); }
.via-slate-800 { --tw-gradient-stops: var(--tw-gradient-from), #1e293b, var(--tw-gradient-to, rgba(30, 41, 59, 0)); }
.to-slate-900 { --tw-gradient-to: #0f172a; }
.from-amber-500 { --tw-gradient-from: #f59e0b; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(245, 158, 11, 0)); }
.to-amber-600 { --tw-gradient-to: #d97706; }
.backdrop-blur-sm { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Typography */
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.text-\[11px\] { font-size: 11px; line-height: 16px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.text-white { color: #ffffff; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #475569; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-amber-50 { color: #fffbeb; }
.text-amber-300 { color: #fcd34d; }
.text-amber-400 { color: #fbbf24; }
.text-amber-500 { color: #f59e0b; }
.text-amber-600 { color: #b45309; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.text-amber-950 { color: #451a03; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration-line: underline; }
.underline-offset-2 { text-underline-offset: 2px; }
.whitespace-pre-line { white-space: pre-line; }

/* Line Clamp */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.duration-300 { transition-duration: 300ms; }
.transform { transform: translateZ(0); }

/* Hover Effects */
.hover\:bg-amber-50:hover { background-color: #fffbeb; }
.hover\:bg-amber-50\/70:hover { background-color: rgba(255, 251, 235, 0.7); }
.hover\:bg-amber-600:hover { background-color: #d97706; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }

.hover\:text-amber-300:hover { color: #fcd34d; }
.hover\:text-amber-600:hover { color: #b45309; }
.hover\:text-amber-700:hover { color: #b45309; }
.hover\:text-amber-800:hover { color: #92400e; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:underline:hover { text-decoration-line: underline; }

.hover\:border-amber-400:hover { border-color: #fbbf24; }
.hover\:shadow-sm:hover { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }

.group:hover .group-hover\:translate-x-0\.5 {
    transform: translateX(0.125rem);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
.focus\:fixed:focus { position: fixed; }
.focus\:top-4:focus { top: 1rem; }
.focus\:left-4:focus { left: 1rem; }
.focus\:z-50:focus { z-index: 50; }
.focus\:bg-amber-500:focus { background-color: #f59e0b; }
.focus\:text-white:focus { color: #ffffff; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5); }
.focus\:ring-amber-500:focus { --tw-ring-color: #f59e0b; }

/* Responsive Media Queries */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:w-auto { width: auto; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:flex { display: flex !important; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:gap-2 { gap: 0.5rem; }
    .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:p-10 { padding: 2.5rem; }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* --- 4. Editorial & Magazine Article (.prose) Typography --- */
.prose {
    font-size: 1rem;
    line-height: 1.85;
    color: #334155;
    word-break: break-word;
}
.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.9;
    letter-spacing: 0.015em;
    color: #334155;
}

/* Section Headings */
.prose h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
    padding: 0.6rem 0.85rem;
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    border-left: 5px solid #f59e0b;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 0.5rem 0.5rem 0;
    display: block;
}
.prose h2:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.prose h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
    line-height: 1.5;
}

.prose h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: #f1f5f9;
    border-radius: 0.375rem;
    border-left: 3px solid #64748b;
}

/* Lists */
.prose ul, .prose ol {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    padding-left: 1.6rem;
    color: #334155;
}
.prose ul {
    list-style-type: disc;
}
.prose ol {
    list-style-type: decimal;
}
.prose li {
    margin-bottom: 0.6rem;
    line-height: 1.75;
    padding-left: 0.25rem;
}
.prose li::marker {
    color: #f59e0b;
    font-weight: bold;
}
.prose strong {
    color: #0f172a;
    font-weight: 700;
    background: linear-gradient(transparent 70%, #fef3c7 70%);
    padding: 0 2px;
}

/* --- 5. Crucial: Reference & Citation Link Styling --- */
/* Inline Links in Article Body */
.prose a {
    color: #1d4ed8;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    text-decoration-color: #93c5fd;
    font-weight: 600;
    padding: 0.1rem 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    word-break: break-all;
}

.prose a:hover {
    color: #1e40af;
    background-color: #eff6ff;
    text-decoration-color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.1);
}

/* External Link Indicator for Prose HTTP links */
.prose a[href^="http"]::after {
    content: " ↗";
    font-size: 0.75em;
    font-weight: bold;
    color: #3b82f6;
    text-decoration: none;
    display: inline-block;
    margin-left: 2px;
    vertical-align: super;
}
.prose a[href^="http"]:hover::after {
    color: #1e40af;
}

/* Bottom Hash Tags Cloud */
.prose > h1:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    line-height: 2;
    margin-top: 2.5rem;
    word-break: break-word;
    letter-spacing: 0.025em;
}

/* Header & Nav solid enhancements */
header.sticky {
    background-color: rgba(255, 255, 255, 0.98) !important;
}
nav[aria-label="パンくずリスト"] {
    background-color: rgba(248, 250, 252, 0.85);
    border-bottom: 1px solid #e2e8f0;
}

/* Keep small foreground text compliant even when Tailwind CDN injects its
   generated stylesheet after this file. The extra selector specificity is
   intentional; it avoids relying on stylesheet load order. */
.text-amber-600:not(i) { color: #b45309; }
.hover\:text-amber-700:hover:not(i) { color: #b45309; }
.text-slate-500.bg-slate-100 { color: #475569; }
