/*
Theme Name: Ie Trouble Perfect
Theme URI: https://ie-trouble.com/
Author: Codex
Description: Pixel-focused homepage theme for 家の困りごと大全.
Version: 1.0.15
Text Domain: ie-trouble-perfect
*/

:root {
  --green: #006b55;
  --green-2: #0d755f;
  --green-dark: #005442;
  --orange: #ff7417;
  --ink: #202326;
  --muted: #6f777a;
  --line: #e4e7e5;
  --soft: #f7faf8;
  --peach: #fff0df;
  --shadow: 0 10px 26px rgba(24, 48, 43, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7faf8;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.site-wrap { overflow: hidden; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(19, 43, 38, .08);
  box-shadow: 0 8px 24px rgba(19, 43, 38, .08);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(1240px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 286px;
  color: var(--green);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border: 3.5px solid var(--green);
  border-radius: 4px;
  position: relative;
}
.brand-mark:before {
  content: "";
  position: absolute;
  left: 6px;
  top: -13px;
  width: 26px;
  height: 26px;
  border-left: 3.5px solid var(--green);
  border-top: 3.5px solid var(--green);
  transform: rotate(45deg);
  background: #fff;
}
.brand-mark:after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 26px;
  height: 13px;
  border-left: 3.5px solid var(--green);
  border-bottom: 3.5px solid var(--green);
  border-radius: 0 0 0 8px;
  box-shadow: 15px 0 0 -10px var(--green);
}
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 1.7vw, 28px);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  color: #202425;
}
.main-nav a { padding: 11px 0; }
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--green);
}
.main-nav .has-caret:after {
  content: "▼";
  margin-left: 7px;
  font-size: 9px;
  color: #1d2425;
  vertical-align: 1px;
}
.hero {
  position: relative;
  min-height: 430px;
  background-image: linear-gradient(90deg, rgba(247,250,248,.88), rgba(255,255,255,.66) 48%, rgba(255,255,255,.28)), url("assets/hero-clean.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-bottom: 1px solid #eef0ee;
}
.hero-inner {
  position: relative;
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 66px 0 38px;
  text-align: center;
}
.hero-dots {
  display: block;
  color: var(--orange);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 18px;
  margin: 0 0 4px 22%;
  line-height: 1;
}
.hero h1 {
  display: block;
  margin: 0 0 22px;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1.28;
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(255,255,255,.65), 0 2px 12px rgba(255,255,255,.45);
}
.hero h1 strong {
  color: var(--orange);
  border: 3px solid currentColor;
  border-radius: 8px;
  padding: 0 5px;
  margin: 0 3px;
}
.hero-search {
  position: relative;
  left: auto;
  top: auto;
  width: min(860px, 100%);
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 12px 8px 30px;
  border: 1px solid rgba(19, 43, 38, .14);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 42px rgba(24, 48, 43, .14);
  opacity: 1;
}
.hero-search .mini-search {
  display: block;
  width: 35px;
  height: 35px;
  border: 4px solid #111;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}
.hero-search .mini-search:after {
  content: "";
  position: absolute;
  width: 14px;
  height: 4px;
  right: -10px;
  bottom: -5px;
  background: #111;
  border-radius: 99px;
  transform: rotate(45deg);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  outline: none;
}
.hero-search input::placeholder { color: #8b9092; }
.hero-search button {
  width: 150px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
  transition: transform .16s ease, background-color .16s ease;
}
.hero-search button:hover { background: #e8610f; transform: translateY(-1px); }
.popular-keys {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  font-weight: 900;
  color: var(--green);
  font-size: 15px;
}
.popular-keys span:first-child {
  color: #767f82;
  font-weight: 800;
}

.section-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}
.icon-rail {
  margin: 22px auto 26px;
  border: 1px solid #dde4e1;
  border-radius: 9px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.035);
}
.icon-item {
  min-height: 0;
  height: 128px;
  padding: 16px 8px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-right: 1px solid #e1e5e3;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
  color: #171b1d;
  transition: background-color .16s ease, color .16s ease;
}
.icon-item:last-child { border-right: 0; }
.icon-item:hover {
  background: #f5faf8;
  color: var(--green);
}
.icon-item svg {
  width: 56px;
  height: 56px;
  stroke: var(--green);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 1;
}
.icon-item span {
  opacity: 1;
  display: block;
  white-space: nowrap;
}

.home-grid {
  display: block;
  margin-bottom: 28px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.025);
}
.content-panel { padding: 26px 24px 30px; margin-bottom: 26px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
}
.crown { color: var(--orange); font-size: 28px; }
.more-link {
  color: var(--green);
  font-weight: 900;
  font-size: 15px;
}
.more-link:after { content: "›"; margin-left: 8px; font-size: 24px; vertical-align: -2px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-card {
  overflow: hidden;
  border: 1px solid #dde2df;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,107,85,.28);
  box-shadow: 0 16px 34px rgba(24, 48, 43, .11);
}
.post-thumb {
  position: relative;
  aspect-ratio: 1.38 / 1;
  overflow: hidden;
  background: #edf2f0;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tag-pill {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--green-2);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}
.post-body { padding: 15px 14px 16px; }
.post-title {
  min-height: 58px;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 900;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #7e8588;
  font-weight: 700;
  font-size: 14px;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.reason-card {
  min-height: 148px;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  border: 1px solid #e2e5e3;
  background: #f5f7f5;
  box-shadow: 0 8px 20px rgba(24,48,43,.06);
}
.reason-card img {
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
  filter: saturate(.95);
}
.reason-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--green);
  font-weight: 900;
}
.season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.season-card {
  padding: 26px 18px;
  min-height: 172px;
  border: 1px solid #e0e5e2;
  border-radius: 10px;
  text-align: center;
  background: #fff;
}
.season-card .season-icon { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.season-card h3 { margin: 0 0 8px; color: var(--green); font-size: 20px; }
.season-card p { margin: 0 0 12px; color: #5e686b; font-weight: 700; font-size: 13px; line-height: 1.6; }
.season-card a { color: var(--green); font-weight: 900; font-size: 14px; }

.side-panel { margin-bottom: 24px; overflow: hidden; }
.side-title {
  margin: 0;
  padding: 17px 22px;
  background: linear-gradient(180deg, #08775f, #006a54);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.place-list {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.place-list a {
  min-height: 48px;
  height: auto;
  padding: 0 16px;
  border: 1px solid #e3e6e4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  background: #fff;
}
.place-list a:after { content: "›"; font-size: 28px; line-height: 1; }
.ranking { padding: 18px; display: grid; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 32px 72px 1fr; gap: 12px; align-items: center; }
.rank-no { color: var(--orange); font-weight: 900; font-size: 22px; text-align: center; }
.rank-row img { width: 72px; height: 58px; border-radius: 6px; object-fit: cover; }
.rank-row p { margin: 0; font-weight: 900; font-size: 13px; line-height: 1.55; }
.rank-more {
  height: 42px;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wide-band {
  margin: 0 auto 28px;
  padding: 26px;
  background: linear-gradient(90deg, #f5faf7, #fff);
  border: 1px solid #e4e9e6;
  border-radius: 10px;
}
.wide-band h2 {
  margin: 0;
  color: var(--green);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}
.wide-band > p {
  margin: 4px 0 20px;
  text-align: center;
  color: #556064;
  font-weight: 700;
}
.place-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.place-card {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dde4e0;
}
.place-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.place-card strong {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 900;
}
.place-card strong:after { content: "›"; margin-left: 18px; font-size: 24px; }

.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #00634e, #007a63);
}
.footer-main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 36px;
  display: grid;
  grid-template-columns: 360px repeat(3, 1fr);
  gap: 54px;
}
.footer-brand .brand { color: #fff; min-width: 0; font-size: 28px; margin-bottom: 16px; }
.footer-brand .brand-mark { border-color: #fff; }
.footer-brand .brand-mark:before { border-color: #fff; background: transparent; }
.footer-brand .brand-mark:after { border-color: #fff; box-shadow: 18px 0 0 -12px #fff; }
.footer-brand p { margin: 0 0 22px; font-weight: 700; color: rgba(255,255,255,.86); }
.sns { display: flex; gap: 14px; }
.sns span {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.footer-col h3 { margin: 0 0 12px; font-size: 17px; }
.footer-col a {
  display: block;
  color: rgba(255,255,255,.9);
  font-weight: 700;
  padding: 3px 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.22);
}
.footer-bottom-inner {
  width: min(1240px, calc(100% - 48px));
  height: 58px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,.9);
  font-weight: 700;
}
.footer-bottom-links { display: flex; gap: 28px; }

.single-main {
  width: min(920px, calc(100% - 40px));
  margin: 44px auto 64px;
}
.single-main article {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(24,48,43,.07);
}
.single-main h1 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.38; letter-spacing: 0; }
.entry-content {
  font-size: 17px;
  line-height: 1.95;
}
.entry-content h2 {
  margin: 46px 0 18px;
  padding: 0 0 10px;
  border-bottom: 3px solid #e5f1ed;
  color: var(--green-dark);
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.42;
}
.entry-content h3 {
  margin: 34px 0 14px;
  padding-left: 14px;
  border-left: 5px solid var(--green);
  color: #24302d;
  font-size: 22px;
}
.entry-content p { margin: 0 0 20px; }
.entry-content ul,
.entry-content ol { margin: 18px 0 24px; padding-left: 1.45em; }
.entry-content li { margin: 6px 0; }
.entry-content table { border-radius: 8px; overflow: hidden; }
.entry-content img { box-shadow: 0 10px 26px rgba(24,48,43,.09); }

@media (max-width: 1180px) {
  .header-inner { height: auto; padding: 16px 0; flex-wrap: wrap; }
  .brand { min-width: auto; font-size: 30px; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; gap: 26px; }
  .icon-rail { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .place-cards { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section-shell, .header-inner, .hero-inner, .footer-main, .footer-bottom-inner { width: min(100% - 28px, 1240px); }
  .site-header { position: relative; }
  .brand { font-size: 25px; }
  .brand-mark { width: 42px; height: 42px; }
  .hero {
    min-height: 420px;
    background-size: cover;
    background-position: center;
  }
  .hero-inner {
    width: min(100% - 28px, 720px);
    padding: 46px 0 30px;
  }
  .hero-dots { margin-left: 0; font-size: 16px; letter-spacing: 12px; }
  .hero h1 { font-size: 31px; line-height: 1.34; }
  .hero-search {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    border-radius: 22px;
    flex-wrap: wrap;
    padding: 18px;
    opacity: 1;
    background: rgba(255,255,255,.94);
  }
  .hero-search .mini-search { display: block; }
  .hero-search button { width: 100%; }
  .popular-keys { flex-wrap: wrap; gap: 12px 18px; font-size: 14px; }
  .card-grid, .mini-card-grid, .season-grid, .place-cards, .place-list, .footer-main { grid-template-columns: 1fr; }
  .content-panel { padding: 22px 18px 24px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-title { font-size: 23px; }
  .post-title { min-height: 0; }
  .icon-rail {
    grid-template-columns: repeat(9, minmax(118px, 1fr));
    margin-top: 12px;
    overflow-x: auto;
  }
  .icon-item {
    height: 112px;
    font-size: 13px;
  }
  .icon-item svg {
    width: 46px;
    height: 46px;
  }
  .footer-bottom-inner { height: auto; padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 12px; }
  .single-main { width: min(100% - 24px, 920px); margin-top: 22px; }
}
