/* Final layout layer: keeps lists readable from narrow phones to wide desktops. */
html, body { max-width: 100%; overflow-x: hidden; }
button { -webkit-tap-highlight-color: transparent; }
.line-friend-float { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 9px; border: 1px solid #dce6ed; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(7, 29, 61, .2); transition: transform .18s ease, box-shadow .18s ease; }
.line-friend-float:hover, .line-friend-float:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(7, 29, 61, .28); outline: 2px solid #1263e8; outline-offset: 2px; }
.line-friend-float img { display: block; width: auto; max-width: 100%; }
.contact-page { box-sizing: border-box; width: min(860px, 100%); margin: 0 auto; padding: clamp(32px, 6vw, 68px) clamp(18px, 5vw, 52px) 76px; }
.contact-card { padding: clamp(22px, 5vw, 42px); border: 1px solid #dfe8f3; border-radius: 16px; background: #fff; box-shadow: 0 14px 36px rgba(7, 29, 61, .08); }
.contact-heading { margin: 22px 0 28px; }
.contact-heading .eyebrow { margin: 0 0 9px; color: #1263e8; }
.contact-heading h1 { margin: 0 0 10px; color: var(--navy); font-size: clamp(30px, 4vw, 42px); }
.contact-heading p { color: #60728a; line-height: 1.65; }
.contact-guide { margin-top: 14px; padding: 11px 13px; border-left: 3px solid #1263e8; border-radius: 0 7px 7px 0; background: #f3f7fd; color: #31465f !important; font-size: 14px; }
.contact-form { display: grid; gap: 20px; }
.contact-form label { display: grid; gap: 8px; color: var(--navy); font-weight: 700; font-size: 14px; }
.contact-form em { color: #d92d20; font-size: 12px; font-style: normal; }
.contact-form input, .contact-form textarea { box-sizing: border-box; width: 100%; padding: 12px 13px; border: 1px solid #bdcbda; border-radius: 8px; color: var(--navy); font: inherit; font-weight: 400; line-height: 1.5; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #1263e8; outline: 3px solid rgba(18, 99, 232, .14); }
.contact-submit { justify-self: start; min-width: 150px; }
.contact-status { min-height: 1.5em; margin: 20px 0 0; color: #b42318; line-height: 1.6; }
.contact-status.success { padding: 14px 16px; border: 1px solid #9ad8bd; border-radius: 8px; background: #edfcf2; color: #177044; }

.results-page {
  box-sizing: border-box;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px) clamp(18px, 5vw, 52px) 76px;
}
.results-back { margin-bottom: 14px; }
.results-title { margin: 0; color: var(--navy); font-size: clamp(27px, 3.3vw, 38px); line-height: 1.2; letter-spacing: -.5px; }
.results-list { display: grid; gap: 12px; margin-top: 24px; }
.result-card {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 7px;
  padding: 18px 20px 16px;
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  box-shadow: 0 2px 7px rgba(8, 34, 69, .025);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.result-card:hover, .result-card:focus-visible { border-color: #78a8e9; box-shadow: 0 10px 25px rgba(12, 61, 124, .1); transform: translateY(-1px); outline: none; }
.result-card-title { font-size: clamp(16px, 2vw, 18px); font-weight: 750; line-height: 1.45; }
.result-card-summary {
  display: -webkit-box;
  overflow: hidden;
  color: #64758c;
  font-size: 14px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.result-card-action { color: var(--blue); font-size: 13px; font-weight: 700; margin-top: 2px; }
.result-card-action b { font-size: 16px; line-height: 0; margin-left: 3px; }

.article { box-sizing: border-box; width: min(1040px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(18px, 5vw, 52px) 72px; }
.article h1 { font-size: clamp(29px, 4.2vw, 46px); line-height: 1.18; overflow-wrap: anywhere; }
.article .crumb, .article .tag { overflow-wrap: anywhere; }
.article .rich-content { overflow-wrap: anywhere; }
.article .rich-content img, .article .rich-content video, .article .rich-content iframe { max-width: 100%; height: auto; }
.article .rich-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 760px) {
  .top { box-sizing: border-box; min-height: 62px; height: auto; padding: 10px 16px; gap: 10px; }
  .brand-logo { width: 84px; height: 31px; }
  .nav { margin-left: auto; gap: 1px; }
  .nav > button { padding: 7px 7px; font-size: 12px; white-space: nowrap; }
  .nav > button:last-of-type { padding: 7px 8px; }
  .locale-switch { margin-left: 2px; }
  .nav .locale-switch button { padding: 4px 6px; font-size: 11px; }
  .home-hero .shell, .home-main { box-sizing: border-box; width: 100%; padding-left: 16px; padding-right: 16px; }
  .home-hero { padding-top: 52px; padding-bottom: 72px; }
  .home-hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .home-hero p { font-size: 16px; }
  .home-search { width: 100%; }
  .home-search input { min-width: 0; }
  .stat-row { gap: 12px; justify-content: space-between; }
  .stat { min-width: 0; }
  .stat span { display: block; font-size: 11px; }
  .topic-panel { padding: 18px; }
  .topic-grid { gap: 9px; }
  .topic-card { min-height: 112px; padding: 13px; }
  .results-page { padding: 28px 16px 52px; }
  .results-list { gap: 10px; margin-top: 19px; }
  .result-card { padding: 15px 16px 14px; border-radius: 10px; }
  .result-card-summary { font-size: 13px; }
  .article { padding: 28px 16px 54px; }
  .article .rich-content { font-size: 15px; line-height: 1.72; }
  .feedback { padding: 18px; }
}

@media (max-width: 500px) {
  .line-friend-float { right: 14px; bottom: 14px; padding: 5px 7px; border-radius: 9px; }
  .top { align-items: flex-start; flex-direction: column; gap: 6px; }
  .nav { width: 100%; margin-left: 0; justify-content: space-between; }
  .nav > button { padding: 6px 4px; font-size: 12px; }
  .locale-switch { flex-shrink: 0; }
  .home-hero { padding-top: 44px; }
  .home-search { align-items: stretch; flex-direction: column; gap: 8px; padding: 8px; }
  .home-search button { width: 100%; }
  .stat-row { gap: 7px; margin-top: 28px; }
  .stat strong { font-size: 18px; }
  .topic-grid { grid-template-columns: 1fr; }
  .results-title { font-size: 27px; }
  .result-card-title { font-size: 16px; }
  .contact-page { padding: 24px 16px 52px; }
  .contact-card { padding: 20px; border-radius: 12px; }
  .contact-submit { width: 100%; }
}
