/*
Theme Name: Catch Box Kansai Tech
Template: catch-box
Theme URI: https://kansai.osaka.jp/
Description: Kansai Tech child theme for Osaka de (ry). A modern engineering blog skin with a subtle Meiji Osaka atmosphere.
Author: Codex
Version: 2.0.0
*/

:root {
  --kt-bg: #f3ecdf;
  --kt-surface: #fffaf0;
  --kt-surface-2: #f8f0e2;
  --kt-ink: #171a1f;
  --kt-muted: #676053;
  --kt-line: #ddcfba;
  --kt-indigo: #172033;
  --kt-indigo-2: #24324d;
  --kt-brass: #b88a3b;
  --kt-red: #a94736;
  --kt-code: #126b76;
  --kt-shadow: 0 18px 44px rgba(25, 31, 44, 0.14);
}

* { box-sizing: border-box; }

html { background: var(--kt-bg); }

body {
  margin: 0;
  color: var(--kt-ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(184, 138, 59, 0.16), transparent 28rem),
    linear-gradient(180deg, #fff9ed 0%, var(--kt-bg) 48%, #eadfce 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.82;
  letter-spacing: 0;
}

body.custom-background { background-color: var(--kt-bg); }

a {
  color: #176772;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover, a:focus { color: var(--kt-red); }

img { max-width: 100%; height: auto; }

.kt-page {
  min-height: 100vh;
}

.kt-hero {
  position: relative;
  overflow: hidden;
  color: #fff4dd;
  background:
    linear-gradient(90deg, rgba(13, 17, 28, 0.94) 0%, rgba(20, 27, 43, 0.78) 46%, rgba(20, 27, 43, 0.2) 100%),
    url('assets/kansai-tech-hero.jpg') center / cover no-repeat;
  border-bottom: 4px solid var(--kt-brass);
}

.kt-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 17, 28, 0.36));
}

.kt-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  min-height: 330px;
  margin: 0 auto;
  padding: 42px 28px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: center;
}

.kt-brand__title {
  display: inline-block;
  color: #fff6df;
  text-decoration: none;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.96;
  font-weight: 850;
  text-shadow: 0 8px 30px rgba(0,0,0,0.48);
}

.kt-brand__tagline {
  display: inline-block;
  margin: 16px 0 0;
  padding: 7px 13px;
  color: #f9dfaa;
  background: rgba(16, 22, 35, 0.68);
  border-left: 3px solid var(--kt-brass);
  font-weight: 700;
}

.kt-brand__note {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 247, 230, 0.88);
  font-size: 1.05rem;
}

.kt-search {
  justify-self: end;
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255,250,240,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  backdrop-filter: blur(6px);
}

.kt-search input {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  border: 0;
  background: rgba(255,250,240,0.95);
  color: var(--kt-ink);
}

.kt-search button,
.kt-readmore,
input[type="submit"], button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--kt-brass);
  color: #1b1620;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.kt-search button:hover,
.kt-readmore:hover,
input[type="submit"]:hover, button:hover {
  background: #d0a24f;
  color: #111;
}

.kt-nav {
  position: relative;
  z-index: 2;
  background: rgba(12, 17, 28, 0.93);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.kt-menu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.kt-menu li { position: relative; }
.kt-menu a {
  display: block;
  padding: 15px 14px;
  color: #fff3d8;
  text-decoration: none;
  font-weight: 800;
}
.kt-menu a:hover { background: var(--kt-brass); color: #18120d; }
.kt-menu ul { display: none; }

.kt-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 52px;
}

.kt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.kt-section-head {
  margin-bottom: 22px;
  padding: 20px 24px;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid rgba(110, 84, 45, 0.16);
}

.kt-eyebrow {
  margin: 0 0 5px;
  color: var(--kt-brass);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.kt-section-head h1 {
  margin: 0;
  color: var(--kt-indigo);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
}

.kt-card {
  margin: 0 0 22px;
  padding: 26px 28px;
  background: rgba(255, 253, 247, 0.96);
  border: 1px solid rgba(108, 86, 56, 0.16);
  border-left: 5px solid rgba(184, 138, 59, 0.82);
  box-shadow: 0 12px 30px rgba(46, 36, 24, 0.08);
}

.kt-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
  color: var(--kt-muted);
  font-size: 0.88rem;
}

.kt-chip,
.kt-card__footer a {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: #edf6f4;
  color: #12525b;
  border: 1px solid #c9dfda;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 750;
}

.kt-card__title {
  margin: 0;
  color: var(--kt-indigo);
  font-size: clamp(1.45rem, 2.8vw, 2.3rem);
  line-height: 1.33;
  font-weight: 850;
}

.kt-card__title a {
  color: inherit;
  text-decoration: none;
}

.kt-card__title a:hover { color: #176772; }

.kt-card__body {
  margin-top: 16px;
  font-size: 1rem;
}

.kt-card__body p { margin: 0 0 1.25em; }

.kt-card__body h2,
.kt-card__body h3,
.kt-card__body h4 {
  color: var(--kt-indigo);
  line-height: 1.35;
  margin-top: 1.8em;
}

.kt-card__body code,
.comment-content code {
  padding: 0.16em 0.36em;
  color: #12525b;
  background: #edf6f4;
  border: 1px solid #c9dfda;
  border-radius: 4px;
  font-size: 0.94em;
}

.kt-card__body pre,
.comment-content pre {
  padding: 17px 19px;
  color: #f8f0dc;
  background: #172033;
  border-left: 4px solid var(--kt-code);
  overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.kt-card__body blockquote {
  margin: 1.4em 0;
  padding: 0.7em 1.1em;
  color: #4a4034;
  background: #f1e7d6;
  border-left: 4px solid var(--kt-brass);
}

.kt-card__footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--kt-line);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kt-sidebar {
  position: sticky;
  top: 18px;
}

.kt-panel {
  margin-bottom: 18px;
  padding: 19px;
  background: rgba(255,253,247,0.9);
  border: 1px solid rgba(108,86,56,0.15);
  box-shadow: 0 8px 20px rgba(46,36,24,0.06);
}

.kt-panel h2,
.kt-panel .widget-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  color: var(--kt-indigo);
  font-size: 1rem;
  font-weight: 850;
  border-bottom: 2px solid rgba(184,138,59,0.45);
}

.kt-panel ul { margin: 0; padding-left: 1.1em; }
.kt-panel li { margin: 0.42em 0; color: var(--kt-muted); }

.kt-pagination,
.kt-post-nav {
  margin: 24px 0;
  padding: 16px;
  background: rgba(255,253,247,0.82);
  border: 1px solid rgba(108,86,56,0.14);
}

.kt-post-nav {
  display: grid;
  gap: 10px;
}

.kt-footer {
  background: #141b2b;
  color: #d7c8ab;
  border-top: 3px solid var(--kt-brass);
}

.kt-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.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;
}

@media (max-width: 920px) {
  .kt-hero__inner,
  .kt-layout {
    grid-template-columns: 1fr;
  }
  .kt-search { justify-self: stretch; max-width: 520px; }
  .kt-sidebar { position: static; }
}

@media (max-width: 560px) {
  .kt-hero__inner { min-height: 290px; padding: 30px 18px 26px; }
  .kt-brand__title { font-size: 2.75rem; }
  .kt-main { padding: 22px 14px 38px; }
  .kt-card { padding: 21px 18px; }
  .kt-menu { padding: 0 8px; }
  .kt-menu a { padding: 12px 9px; }
}

.comments-area,
#comments {
  margin-top: 24px;
  padding: 24px;
  background: rgba(255,253,247,0.92);
  border: 1px solid rgba(108,86,56,0.15);
}

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-body {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--kt-line);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.kt-section-head--compact {
  margin-bottom: 14px;
}

.kt-activity {
  display: grid;
  grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.kt-activity__rail {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding-right: 3px;
}

.kt-activity__list {
  display: grid;
  gap: 10px;
}

.kt-activity-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  color: var(--kt-ink);
  text-decoration: none;
  background: rgba(255,253,247,0.9);
  border: 1px solid rgba(108,86,56,0.15);
  border-left: 4px solid transparent;
  box-shadow: 0 8px 18px rgba(46,36,24,0.05);
}

.kt-activity-item:hover,
.kt-activity-item:focus,
.kt-activity-item.is-active {
  border-left-color: var(--kt-brass);
  background: #fffaf0;
  color: var(--kt-ink);
  transform: translateX(2px);
}

.kt-activity-item__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff4dd;
  background: linear-gradient(135deg, var(--kt-indigo), #245a64);
  border: 2px solid rgba(184,138,59,0.48);
  border-radius: 50%;
  font-weight: 850;
}

.kt-activity-item__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.kt-activity-item__title {
  color: var(--kt-indigo);
  font-weight: 850;
  line-height: 1.35;
}

.kt-activity-item__meta {
  color: var(--kt-muted);
  font-size: 0.78rem;
}

.kt-activity-item__excerpt {
  color: #3f433f;
  font-size: 0.88rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kt-activity__reader {
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.kt-activity__reader.is-loading {
  opacity: 0.52;
  transform: translateY(3px);
}

.kt-activity__reader .kt-card {
  margin-bottom: 0;
  min-height: 520px;
}

@media (max-width: 980px) {
  .kt-activity {
    grid-template-columns: 1fr;
  }

  .kt-activity__rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Modern Activity Center refresh */
:root {
  --kt-bg: #f4f5f7;
  --kt-surface: #ffffff;
  --kt-surface-2: #f8fafc;
  --kt-ink: #121821;
  --kt-muted: #657080;
  --kt-line: #dde3ea;
  --kt-indigo: #162033;
  --kt-indigo-2: #263348;
  --kt-brass: #9f7a35;
  --kt-red: #9b3f36;
  --kt-code: #0c7684;
  --kt-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

html,
html.js {
  margin-top: 0 !important;
  background: var(--kt-bg);
}

body,
body.custom-background {
  color: var(--kt-ink);
  background: #f4f5f7;
  line-height: 1.78;
}

.kt-page {
  background: #f4f5f7;
}

.kt-hero {
  color: #f8fafc;
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.94) 0%, rgba(14, 22, 36, 0.76) 48%, rgba(14, 22, 36, 0.32) 100%),
    url('assets/kansai-tech-hero.jpg') center 46% / cover no-repeat;
  border-bottom: 1px solid rgba(159, 122, 53, 0.58);
}

.kt-hero__shade {
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.08), rgba(8, 13, 24, 0.44));
}

.kt-hero__inner {
  max-width: 1600px;
  min-height: 230px;
  padding: 34px 30px 28px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 42px;
}

.kt-brand__title {
  font-size: clamp(2.15rem, 4.7vw, 4.25rem);
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: 0;
  color: #fffdf7;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.kt-brand__tagline {
  margin-top: 12px;
  padding: 0 0 0 12px;
  background: transparent;
  border-left: 2px solid rgba(214, 173, 93, 0.9);
  color: rgba(248, 250, 252, 0.84);
  font-size: 0.86rem;
  font-weight: 720;
}

.kt-brand__note {
  margin-top: 12px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.94rem;
}

.kt-search {
  align-self: center;
  padding: 6px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.12);
  border: 1px solid rgba(248, 250, 252, 0.18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.kt-search input {
  padding: 10px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
}

.kt-search button,
.kt-readmore,
input[type="submit"],
button {
  border-radius: 4px;
  background: #243348;
  color: #f8fafc;
  font-weight: 740;
}

.kt-search button:hover,
.kt-readmore:hover,
input[type="submit"]:hover,
button:hover {
  background: #0f766e;
  color: #fff;
}

.kt-nav {
  background: rgba(8, 13, 24, 0.91);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kt-menu {
  max-width: 1600px;
  padding: 0 24px;
}

.kt-menu a {
  padding: 13px 12px;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.88rem;
  font-weight: 760;
}

.kt-menu a:hover {
  background: rgba(15, 118, 110, 0.22);
  color: #fff;
}

.kt-main {
  max-width: 1680px;
  padding: 22px 24px 48px;
}

.kt-section-head,
.kt-panel,
.kt-card,
.comments-area,
#comments,
.kt-pagination,
.kt-post-nav {
  background: var(--kt-surface);
  border: 1px solid var(--kt-line);
  box-shadow: var(--kt-shadow);
}

.kt-card {
  border-left: 0;
  border-radius: 8px;
  padding: 30px 34px;
}

.kt-card__title {
  color: #111827;
  font-size: clamp(1.55rem, 2.4vw, 2.55rem);
  line-height: 1.32;
  font-weight: 820;
}

.kt-card__body {
  color: #1f2937;
  font-size: 1.01rem;
}

.kt-chip,
.kt-card__footer a {
  background: #e7f7f5;
  border-color: #bfe6e1;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 760;
}

.kt-activity {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(320px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.kt-popular,
.kt-activity__rail {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  scrollbar-width: thin;
}

.kt-rail-head {
  margin-bottom: 10px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--kt-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.kt-rail-head p {
  margin: 0 0 4px;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kt-rail-head h1,
.kt-rail-head h2 {
  margin: 0;
  color: #182233;
  font-size: 1rem;
  line-height: 1.34;
  font-weight: 780;
}

.kt-popular__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  counter-reset: popular;
}

.kt-popular__list li {
  counter-increment: popular;
}

.kt-popular__list a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  padding: 12px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--kt-line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.kt-popular__list a::before {
  content: counter(popular, decimal-leading-zero);
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.6;
}

.kt-popular__list span {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.45;
}

.kt-popular__list small {
  grid-column: 2;
  color: var(--kt-muted);
  font-size: 0.72rem;
}

.kt-popular__list a:hover,
.kt-popular__list a:focus {
  border-color: rgba(15, 118, 110, 0.42);
  background: #fff;
  transform: translateY(-1px);
}

.kt-activity__list {
  gap: 8px;
}

.kt-activity-item {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--kt-line);
  border-left: 1px solid var(--kt-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.kt-activity-item:hover,
.kt-activity-item:focus,
.kt-activity-item.is-active {
  border-color: rgba(15, 118, 110, 0.5);
  background: #ffffff;
  color: var(--kt-ink);
  transform: translateY(-1px);
}

.kt-activity-item.is-active {
  box-shadow: inset 3px 0 0 #0f766e, 0 12px 28px rgba(15, 23, 42, 0.075);
}

.kt-activity-item__icon {
  width: 32px;
  height: 32px;
  color: #0f766e;
  background: #e7f7f5;
  border: 1px solid #bfe6e1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 820;
}

.kt-activity-item__title {
  color: #182233;
  font-size: 0.95rem;
  font-weight: 760;
  line-height: 1.45;
}

.kt-activity-item__meta {
  color: var(--kt-muted);
  font-size: 0.73rem;
}

.kt-activity-item__excerpt {
  color: #526071;
  font-size: 0.82rem;
  line-height: 1.55;
}

.kt-activity__reader .kt-card {
  min-height: calc(100vh - 104px);
  margin-bottom: 0;
}

.kt-card--reader .kt-card__title,
.kt-activity__reader .kt-card__title {
  font-size: clamp(1.85rem, 3vw, 3.05rem);
}

.kt-card--reader .kt-card__body,
.kt-activity__reader .kt-card__body {
  max-width: 880px;
}

.kt-card--reader .kt-readmore,
.kt-activity__reader .kt-readmore {
  display: none;
}

@media (min-width: 1400px) {
  .kt-activity {
    grid-template-columns: minmax(210px, 270px) minmax(350px, 420px) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .kt-activity {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }
  .kt-popular {
    display: none;
  }
}

@media (max-width: 920px) {
  .kt-hero__inner {
    min-height: 220px;
    grid-template-columns: 1fr;
    align-items: end;
  }
  .kt-activity {
    grid-template-columns: 1fr;
  }
  .kt-popular,
  .kt-activity__rail {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .kt-hero__inner {
    min-height: 210px;
    padding: 26px 16px 22px;
  }
  .kt-brand__title {
    font-size: 2.25rem;
  }
  .kt-brand__note {
    font-size: 0.88rem;
  }
  .kt-main {
    padding: 16px 12px 36px;
  }
  .kt-card {
    padding: 22px 18px;
  }
  .kt-card--reader .kt-card__title,
  .kt-activity__reader .kt-card__title {
    font-size: 1.65rem;
  }
}

html[style],
body[style],
body.admin-bar {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#wpadminbar {
  display: none !important;
}

.kt-page,
.kt-hero {
  margin-top: 0 !important;
}

.kt-popular__list a.is-active {
  border-color: rgba(15, 118, 110, 0.5);
  background: #ffffff;
  box-shadow: inset 3px 0 0 #0f766e, 0 12px 28px rgba(15, 23, 42, 0.075);
}

html:root,
html:root body {
  margin-top: 0 !important;
}

.kt-article-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  font-weight: 820;
  letter-spacing: 0;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.kt-article-icon--xs {
  width: 26px;
  height: 26px;
  font-size: 0.62rem;
  border-radius: 7px;
}

.kt-article-icon--sm {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
}

.kt-article-icon--md {
  width: 42px;
  height: 42px;
  font-size: 0.82rem;
}

.kt-article-icon--lg {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.kt-article-icon--image {
  object-fit: cover;
  background: #e5e7eb;
}

.kt-article-icon--tone-1 { background: linear-gradient(135deg, #dff8f4, #bdebe4); color: #0f766e; }
.kt-article-icon--tone-2 { background: linear-gradient(135deg, #e8eefc, #cdd9fb); color: #284b9b; }
.kt-article-icon--tone-3 { background: linear-gradient(135deg, #f1f5f9, #dbe4ef); color: #334155; }
.kt-article-icon--tone-4 { background: linear-gradient(135deg, #f7ead5, #efd2a2); color: #8a5a13; }
.kt-article-icon--tone-5 { background: linear-gradient(135deg, #f4e7f8, #e4c9ef); color: #7e3f98; }
.kt-article-icon--tone-6 { background: linear-gradient(135deg, #e8f5df, #cce9b9); color: #3d7b2f; }

.kt-activity-item > .kt-article-icon {
  align-self: start;
}

.kt-popular__list a {
  grid-template-columns: 26px minmax(0, 1fr);
}

.kt-popular__list a::before {
  content: none;
}

.kt-popular__list small {
  grid-column: 2;
}

.kt-card__header--with-icon {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.kt-card__heading {
  min-width: 0;
}

@media (max-width: 560px) {
  .kt-card__header--with-icon {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }
  .kt-article-icon--lg {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 0.72rem;
  }
}

.kt-card__featured {
  margin: 18px 0 24px;
  overflow: hidden;
  border: 1px solid var(--kt-line);
  border-radius: 10px;
  background: #111827;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.kt-card__featured-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.kt-activity__reader {
  position: relative;
}

.kt-activity__reader::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 42%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #0f766e, #67e8f9, transparent);
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.kt-activity__reader::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.52) 48%, transparent 100%),
    rgba(248, 250, 252, 0.42);
  opacity: 0;
  pointer-events: none;
}

.kt-activity__reader.is-loading::before {
  opacity: 1;
  animation: kt-reader-progress 0.9s ease-in-out infinite;
}

.kt-activity__reader.is-loading::after {
  opacity: 1;
  animation: kt-reader-sheen 1.1s ease-in-out infinite;
}

.kt-activity__reader.is-loading .kt-card {
  filter: saturate(0.82);
}

@keyframes kt-reader-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(240%); }
}

@keyframes kt-reader-sheen {
  0% { background-position: -180px 0, 0 0; }
  100% { background-position: 180px 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .kt-activity__reader.is-loading::before,
  .kt-activity__reader.is-loading::after {
    animation: none;
  }
}

/* Clearer article loading state */
.kt-activity__reader::before {
  content: "";
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #ffffff 0 52%, transparent 54%),
    conic-gradient(from 0deg, #0f766e, #67e8f9, #2563eb, #0f766e);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translate(-50%, -66%) scale(0.92);
  pointer-events: none;
}

.kt-activity__reader::after {
  content: "記事を読み込み中";
  position: absolute;
  z-index: 5;
  top: calc(50% + 24px);
  left: 50%;
  right: auto;
  bottom: auto;
  inset: auto auto auto 50%;
  padding: 10px 14px;
  min-width: 148px;
  color: #102033;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  font-size: 0.86rem;
  font-weight: 780;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.96);
  pointer-events: none;
}

.kt-activity__reader.is-loading::before {
  opacity: 1;
  animation: kt-reader-spinner 0.82s linear infinite;
}

.kt-activity__reader.is-loading::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.kt-activity__reader.is-loading .kt-card {
  opacity: 0.42;
  filter: blur(0.7px) saturate(0.75);
  pointer-events: none;
}

@keyframes kt-reader-spinner {
  0% { transform: translate(-50%, -66%) scale(0.92) rotate(0deg); }
  100% { transform: translate(-50%, -66%) scale(0.92) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .kt-activity__reader.is-loading::before {
    animation: none;
  }
}
