:root {
  --color-bg: #edeff2;        /* 연한 회색 */
  --color-bg-alt: rgba(240, 242, 246, 0.85);    /* 카드용 반투명 배경 */
  --color-navy: #343434;      /* 폰트 컬러 */
  --color-navy-soft: #4a5568;
  --color-navy-light: #9fb0c9;
  --color-border: #dadde2;
  --color-border-strong: #c7cbd3;
  --color-text: var(--color-navy);
  --color-muted: var(--color-navy-soft);
  --color-accent: var(--color-navy);
  --gradient-pastel: linear-gradient(120deg, #ffe0ef 0%, #e3e0ff 50%, #dcf5ea 100%);
  --max-width: 1100px;
  --header-space: 5.5rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'LINE Seed JP', -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--color-text);
  background: #ffffff;
  line-height: 1.6;
}

#media { scroll-margin-top: var(--header-space); }
/* hidden wins over component display rules (e.g. a badge left empty in admin). */
[hidden] { display: none !important; }
/* English visitors: hide the Japanese defaults until applyI18n swaps them (see <head>). */
html.i18n-pending [data-i18n] { visibility: hidden; }
/* English visitors: the hero copy waits for hero-text.json instead of flashing the Japanese default. */
html[lang="en"] .hero:not(.hero-text-ready) :is(#hero-tag, #hero-title, #hero-subtitle, #hero-desc) { visibility: hidden; }

/* Page-to-page navigation (same-origin): a short cross-fade instead of a blank flash, with
   the header held in place and the current-page pill gliding between menu links.
   Browsers without cross-document view transitions simply navigate as before. */
@view-transition { navigation: auto; }
header.site-header { view-transition-name: site-header; }
.nav-indicator { view-transition-name: nav-indicator; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.22s; }
::view-transition-group(nav-indicator) { animation-duration: 0.3s; }
/* Desktop ホーム: when going back to the home page (which has no ホーム link), it slides
   out to the right and fades, the reverse of its entrance. */
.desktop-nav a[href="/"] { view-transition-name: nav-home; }
/* Between other pages (both sides have it) it just stays put: no old image, no fade. */
::view-transition-old(nav-home) { animation: none; opacity: 0; }
::view-transition-new(nav-home) { animation: none; }
/* Only the old one exists = the new page is home: play the exit. */
::view-transition-old(nav-home):only-child { opacity: 1; animation: nav-home-out 0.3s ease-in both; }
@keyframes nav-home-out { to { opacity: 0; transform: translateX(12px); } }
/* Off on phones: the browser holds the old page until the new one is ready to show,
   which made image-heavy pages (home) feel slow to open on mobile. */
@media (prefers-reduced-motion: reduce), (max-width: 600px) {
  @view-transition { navigation: none; }
}
main { padding-top: var(--header-space); transition: padding-top 0.3s ease; overflow-x: clip; }

a { color: var(--color-accent); text-decoration: none; transition: opacity 0.15s ease; }
a:hover { text-decoration: none; opacity: 0.65; }
.logo:hover,
.desktop-nav a:hover,
.btn-solid-light:hover,
.btn-outline-light:hover,
.contact-cat-card:hover,
.news-card:hover,
.quicklink-card:hover,
.brand-card:hover,
footer.site-footer a:hover {
  opacity: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header.site-header {
  position: fixed;
  top: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(246, 247, 249, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(22, 35, 60, 0.12);
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
}

.header-right { display: flex; align-items: center; gap: 1.5rem; }

.desktop-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.85rem;
}
.desktop-nav a,
.nav-cta { white-space: nowrap; }
.desktop-nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}
.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(22, 35, 60, 0.1);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, width 0.25s ease, height 0.25s ease, opacity 0.15s ease;
}

.menu-toggle {
  display: none;
  border: none;
  background: none;
  padding: 0.3rem;
  color: var(--color-navy);
  cursor: pointer;
}
/* The global button:hover background would otherwise stick as a gray circle after a tap. */
.menu-toggle:hover { background: none; }
.menu-toggle { -webkit-tap-highlight-color: transparent; }
.menu-toggle svg line {
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.menu-toggle[aria-expanded="true"] svg line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] svg line:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] svg line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.lang-dropdown { position: relative; display: none; }
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #9a9fa8;
  border-radius: 6px;
  background: transparent;
  color: var(--color-navy);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.lang-dropdown-caret { transition: transform 0.15s ease; }
.lang-dropdown.open .lang-dropdown-caret { transform: rotate(180deg); }
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.12);
  overflow: hidden;
  z-index: 30;
}
.lang-dropdown.open .lang-dropdown-menu { display: block; }
.lang-dropdown-menu .lang-opt {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 0;
  padding: 0.55rem 1rem;
  font-size: 0.75rem;
  color: var(--color-navy);
}
.lang-dropdown-menu .lang-opt:hover { background: var(--color-bg); }
.lang-dropdown-menu .lang-opt.is-active { display: none; }

.header-mobile-nav {
  max-height: 0;
  min-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.header-mobile-nav-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.25rem 1.5rem 0.4rem;
}
/* Search icon at the right end of the menu's last row. */
.header-mobile-nav .mobile-menu-search { position: absolute; right: 1.1rem; bottom: 0.4rem; display: flex; align-items: center; height: 2.3rem; padding: 0 0.3rem; -webkit-tap-highlight-color: transparent; }
.header-mobile-nav a { flex-shrink: 0; padding: 0.4rem 0; font-size: 0.95rem; color: var(--color-navy); }
/* Current page in the menus: bold; desktop gets the resting white pill (initNavIndicator),
   mobile a pastel pill sized to the text (negative margin keeps the text aligned). */
/* Faux bold (same as hover): real bold would widen the link and shift the others. */
.desktop-nav a.is-current { text-shadow: 0.3px 0 currentColor, -0.3px 0 currentColor; }
/* ホーム appearing after leaving the home page (animateHomeLinkAfterHome, desktop menu only). */
.desktop-nav a.nav-home-pending { opacity: 0; }
.desktop-nav a.nav-home-enter { animation: nav-home-in 0.45s ease-out both; }
@keyframes nav-home-in { from { opacity: 0; transform: translateX(12px); } }
@media (prefers-reduced-motion: reduce) { .desktop-nav a.nav-home-enter { animation: none; } }
.header-mobile-nav a.is-current { align-self: flex-start; margin-left: -0.8rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: var(--gradient-pastel); font-weight: 700; }

/* Left-aligned: the image and the scrolled-in name share one cell, so centering would shift
   the image whenever the name's width changes (株式会社ETPI vs ETPI Inc.). */
.logo { display: grid; align-items: center; justify-items: start; height: 28px; overflow: hidden; }
/* Desktop: a little more room between the header's rounded edge and the logo. */
@media (min-width: 601px) { .logo { margin-left: 0.75rem; } }
.logo-img {
  grid-area: 1 / 1;
  height: 28px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.logo-text {
  grid-area: 1 / 1;
  height: 28px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-navy);
  white-space: nowrap;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.site-header.scrolled .logo-img { transform: translateY(-100%); opacity: 0; }
.site-header.scrolled .logo-text { transform: translateY(0); opacity: 1; }

.nav-cta { color: var(--color-navy); }
.desktop-nav a:hover { text-shadow: 0.3px 0 currentColor, -0.3px 0 currentColor; }

/* "新着" badge on the お知らせ menu link (js/i18n.js, initNewsBadge). White pill whose outline is a
   gradient of four colors that keeps flowing around it. Desktop: a speech bubble hanging under
   the link; mobile: a pill at the right end of the menu row. */
.news-badge {
  --news-badge-gradient: linear-gradient(90deg, #f08a7e, #e57fa8, #a28be6, #f0aa72, #f08a7e);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* The 2px border is the outline: it is transparent, and the gradient is painted under it only
     (border-box) while the white fill stays inside it (padding-box). Everything is painted once and
     clipped at the rounded outer edge, so no white fringe shows outside the outline. The gradient
     scrolls sideways; it starts and ends on the same color, so the loop has no seam. */
  border: 2px solid transparent;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box, var(--news-badge-gradient) border-box;
  background-size: 100% 100%, 300% 100%;
  background-repeat: no-repeat, repeat-x;
  animation: news-badge-flow 3.6s linear infinite;
  color: var(--color-navy);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: none;
  pointer-events: none;
}
@keyframes news-badge-flow { to { background-position: 0 0, 150% 0; } }
/* Desktop: the bubble (pill + the little notch pointing up at the link) is one SVG path, drawn by
   drawNewsBadgeShape() in js/i18n.js, so the outline and the notch are one continuous stroke in
   one flowing gradient. The text sits on top. */
.news-badge-desktop {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.2rem);
  z-index: 2;
  transform: translateX(-50%);
  border: 0;
  padding: 0.14rem 0.6rem;
  background: none;
  animation: none;
}
.news-badge-shape {
  position: absolute;
  left: 0;
  top: -6px;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(22, 35, 60, 0.14));
}
.news-badge-text { position: relative; }
/* News cards (list + home): the same tag, just left of the category icon (icon: 32px at 10px). */
.news-badge.news-card-new {
  position: absolute;
  top: 26px; /* the icon's vertical center */
  right: 50px;
  z-index: 1;
  transform: translateY(-50%);
  padding: 0.04rem 0.6rem;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(22, 35, 60, 0.14);
}
/* Mobile menu: the badge sits right next to the お知らせ text, not at the row's far end. */
.header-mobile-nav a.has-news-badge { display: flex; align-items: center; justify-content: flex-start; }
.news-badge-mobile { margin-left: 0.6rem; padding: 0.05rem 0.6rem; font-size: 0.72rem; }
@media (prefers-reduced-motion: reduce) {
  .news-badge { animation: none; }
}

.lang-switch {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.lang-opt {
  border: none;
  border-radius: 0;
  background: none;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-opt:hover { background: var(--color-bg); }
.lang-opt.is-active {
  background: var(--color-border);
  color: var(--color-navy);
  font-weight: 700;
}
.lang-opt.is-active:hover { background: var(--color-border); }

/* Sections */
.section { padding: 4.5rem 0; }
/* Mobile: a slightly shorter gap between a page's title area and its first content. */
@media (max-width: 600px) {
  .page-header + .section { padding-top: 3.5rem; }
  /* When the first content is text (not a box), drop the line's top half-leading so the
     text starts at the same height as boxed content on other pages. */
  .page-header + .section .container > .section-label:first-child,
  .page-header + .section .policy > :first-child,
  #news-detail > .news-article-meta { margin-top: calc((1em - 1lh) / 2); }
}
.section-alt { background: var(--color-bg-alt); }
.section-divider { border-top: 1px solid var(--color-border); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.section-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--color-navy-soft);
  margin-bottom: 0.4rem;
}
.label-num { color: var(--color-border-strong); margin-right: 0.6em; font-weight: 400; }

.section-title { font-size: 1.85rem; margin: 0 0 1.5rem; letter-spacing: -0.01em; }
.section-head .section-title { margin-bottom: 0; }

/* Page header (subpages) */
.page-header {
  background: var(--gradient-pastel);
  color: #343434;
  margin-top: calc(-1 * var(--header-space));
  padding-top: calc(var(--header-space) + 3.5rem);
  padding-bottom: 3.5rem;
  transition: margin-top 0.3s ease, padding-top 0.3s ease;
}
.breadcrumb { font-size: 0.8rem; color: var(--color-navy-soft); margin-bottom: 0.6rem; }
.page-header h1,
.page-header .page-title { margin: 0; font-size: 2.25rem; font-weight: 700; letter-spacing: -0.01em; }
.page-header .section-head { margin-bottom: 0; align-items: center; }
.page-header .btn-outline-light { padding: 0.6rem 1.3rem; }
.page-header .btn-outline-light:hover { background: #fff; }

/* Hero (TOP) */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  margin-top: calc(-1 * var(--header-space));
  padding-top: calc(var(--header-space) + 3.5rem);
  padding-bottom: 3.5rem;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, #ffffff 0%, #f2effa 100%);
  color: var(--color-navy);
  transition: margin-top 0.3s ease, padding-top 0.3s ease;
}
.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-blob {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
  will-change: transform;
}
.hero-blob-1 {
  width: 42vmax;
  height: 42vmax;
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, #ffb3d9 0%, #ffb3d9 35%, transparent 70%);
  animation: heroBlobFloat1 3s ease-in-out infinite;
}
.hero-blob-2 {
  width: 38vmax;
  height: 38vmax;
  top: -8%;
  right: -10%;
  background: radial-gradient(circle, #9dceff 0%, #9dceff 35%, transparent 70%);
  animation: heroBlobFloat2 3.5s ease-in-out infinite;
}
.hero-blob-3 {
  width: 34vmax;
  height: 34vmax;
  top: 2%;
  left: 28%;
  background: radial-gradient(circle, #c3b3ff 0%, #c3b3ff 35%, transparent 70%);
  animation: heroBlobFloat3 4s ease-in-out infinite;
}
.hero-blob-4 {
  width: 28vmax;
  height: 28vmax;
  top: -18%;
  right: 22%;
  background: radial-gradient(circle, #9deec4 0%, #9deec4 35%, transparent 70%);
  animation: heroBlobFloat4 2.5s ease-in-out infinite;
}
@keyframes heroBlobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(10vw, -8vh) scale(1.1); }
  50% { transform: translate(14vw, 16vh) scale(1.3); }
  75% { transform: translate(-6vw, 10vh) scale(1.05); }
}
@keyframes heroBlobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-12vw, -10vh) scale(0.85); }
  50% { transform: translate(-16vw, 14vh) scale(0.8); }
  75% { transform: translate(6vw, 6vh) scale(0.95); }
}
@keyframes heroBlobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-10vw, -12vh) scale(1.1); }
  50% { transform: translate(10vw, -14vh) scale(1.25); }
  75% { transform: translate(12vw, 8vh) scale(1.1); }
}
@keyframes heroBlobFloat4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(9vw, -8vh) scale(1.1); }
  50% { transform: translate(-12vw, 12vh) scale(1.2); }
  75% { transform: translate(-9vw, -6vh) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-blob { animation: none; }
}
.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-navy);
  font-weight: bold;
  margin-bottom: 1rem;
}
.hero h1,
.hero h2 { font-family: 'Klee One', 'LINE Seed JP', sans-serif; }
.hero h1 { font-size: 2.75rem; line-height: 1.15; margin: 0 0 0.85rem; letter-spacing: 0.02em; white-space: nowrap; color: #343434; }
.mobile-break { display: none; }
.nobreak { white-space: nowrap; }
.mobile-only { display: none; }
.hero h2 { font-size: 1.5rem; margin: 0 0 1.75rem; font-weight: 600; line-height: 1.5; color: var(--color-navy); }
.hero p { color: var(--color-navy-soft); max-width: 520px; margin: 0 0 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.hero-actions .btn-solid-light { border: 1px solid var(--color-border-strong); }
.hero-actions .btn-outline-light { background: rgba(255, 255, 255, 0.65); }
.hero-actions .btn-outline-light:hover { background: rgba(255, 255, 255, 0.85); }
.btn-solid-light {
  background: var(--gradient-pastel);
  color: #343434;
  padding: 0.7rem 1.3rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
}
.btn-solid-light:hover { filter: brightness(0.95); text-decoration: none; }
.btn-outline-light {
  display: inline-block;
  border: 1px solid var(--color-border-strong);
  color: var(--color-navy);
  padding: 0.7rem 1.3rem;
  border-radius: 4px;
  font-size: 0.9rem;
}
.btn-outline-light:hover { background: rgba(22, 35, 60, 0.06); text-decoration: none; }
.hero-visual {
  position: relative;
  /* 9:16 matches the slide photos, so nothing is cropped; height capped at 72vh via the width. */
  aspect-ratio: 9 / 16;
  width: min(100%, calc(72vh * 9 / 16));
  justify-self: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(22, 35, 60, 0.06), 0 18px 40px -8px rgba(22, 35, 60, 0.18);
}
/* Slides stack inside the frame and the background copy. */
.hero-visual img,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
/* Frame: slow blur crossfade inside the fixed frame. The slight scale while blurred keeps
   the blur's soft, see-through edges outside the frame's clipped area. */
.hero-visual img {
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.06);
  transition: opacity 1.8s ease, filter 1.8s ease, transform 1.8s ease;
  /* Keep each slide on its own GPU layer even at rest: ending on `none` let the browser drop
     the layer and re-rasterize at a snapped position, which showed as a jolt after the fade. */
  will-change: opacity, filter, transform;
  backface-visibility: hidden;
}
.hero-visual img.is-active { opacity: 1; filter: blur(0); transform: scale(1); }
/* Background: crossfade. */
.hero-bg img { opacity: 0; transition: opacity 1.2s ease; }
.hero-bg img.is-active { opacity: 1; }
/* Desktop: a faint, blurred copy of the current slide under the color blobs. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
  filter: blur(12px) saturate(1.15);
  transform: scale(1.15); /* hides the blur's soft edges */
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual img, .hero-bg img { transition: none !important; }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stats-grid > div { border-left: 1px solid var(--color-border); padding-left: 1.5rem; }
.stats-grid > div:first-child { border-left: none; padding-left: 0; }
.stat-value { font-size: 2rem; font-weight: bold; color: var(--color-navy); }
.stat-value .star { color: #c9992a; }
.stat-label { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.3rem; }
/* Footnote right under the label (PC and mobile alike). */
.stat-note { font-size: 10px; line-height: 1.5; color: #6b7280; margin-top: 0.3rem; white-space: pre-line; } /* a line break typed in the admin page shows as a line break */

/* News list (shared with news.html) */
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.news-card {
  display: block;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  position: relative;
  border-radius: 10px;
  color: inherit;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { z-index: 1; text-decoration: none; box-shadow: 0 8px 20px rgba(22, 35, 60, 0.1); transform: translateY(-2px); }

.news-card-img { width: 100%; height: 160px; object-fit: cover; display: block; border-radius: 10px 10px 0 0; }

/* Category icon (top-right of a news card) with a bubble naming it on hover */
.news-cat { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(22, 35, 60, 0.1); box-shadow: 0 2px 8px rgba(22, 35, 60, 0.12); color: var(--color-navy); }
.news-cat-tip { display: none; position: absolute; top: 50%; left: calc(100% + 10px); transform: translateY(-50%); padding: 0.35rem 0.7rem; border-radius: 6px; background: var(--color-navy); color: #fff; font-size: 0.75rem; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 12px rgba(22, 35, 60, 0.18); pointer-events: none; }
.news-cat-tip::before { content: ''; position: absolute; top: 50%; right: 100%; transform: translateY(-50%); border: 5px solid transparent; border-right-color: var(--color-navy); }
.news-cat:hover .news-cat-tip { display: block; animation: news-cat-tip-in 0.15s ease; }
.news-cat.is-flipped .news-cat-tip { left: auto; right: calc(100% + 10px); }
.news-cat.is-flipped .news-cat-tip::before { right: auto; left: 100%; border-right-color: transparent; border-left-color: var(--color-navy); }
@keyframes news-cat-tip-in { from { opacity: 0; } to { opacity: 1; } }
/* No image: the icon sits over the text, so keep the title clear of it. */
.news-cat:first-child ~ .news-card-body { padding-right: 3.2rem; }

/* Business page: sales platform logos flowing in a loop under the channel cards */
.platforms { margin-top: 2.5rem; }
.platforms-label { margin: 0 0 0.9rem; font-size: 0.8rem; font-weight: 700; color: var(--color-muted); text-align: center; }
/* A real horizontal scroller (drag / swipe / trackpad); business.js scrolls it on its own. */
.platform-marquee { overflow-x: auto; scrollbar-width: none; cursor: grab; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.platform-marquee::-webkit-scrollbar { display: none; }
.platform-marquee.is-dragging { cursor: grabbing; user-select: none; }
.platform-track { display: flex; width: max-content; padding: 6px 0 12px; }
.platform-logo { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 64px; min-width: 140px; margin-right: 1rem; padding: 0.75rem 1.25rem; background: #fff; border: 1px solid rgba(22, 35, 60, 0.08); border-radius: 10px; box-shadow: 0 4px 14px rgba(22, 35, 60, 0.05); }
.platform-logo img { display: block; max-height: 36px; max-width: 140px; width: auto; object-fit: contain; }
a.platform-logo:hover { border-color: var(--color-border-strong); }
@media (prefers-reduced-motion: reduce) {
  .platform-marquee { overflow: visible; cursor: auto; }
  .platform-track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 1rem; }
  .platform-logo[aria-hidden="true"] { display: none; }
}

/* Home news slider: 3 cards per view (1.15 on mobile), scroll-snapped. The padding gives
   the hover lift and shadows room inside the scroll box; negative margins cancel it out. */
.news-slider-wrap { position: relative; }
.news-slider { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 3rem) / 3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; scrollbar-width: none; padding: 6px 4px 24px; margin: -6px -4px -24px; }
.news-slider::-webkit-scrollbar { display: none; }
.news-slider > * { scroll-snap-align: start; }
.news-slider > .list-empty { grid-column: auto; width: 100%; }
.news-slider:has(> .list-empty),
.news-slider:has(> .dots-loader) { grid-auto-columns: 100%; }
.news-more-card { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 180px; font-weight: 700; color: var(--color-navy); }
.news-more-card svg { transition: transform 0.2s ease; }
.news-more-card:hover svg { transform: translateX(3px); }
.news-slider-btn { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.95); border: 1px solid var(--color-border-strong); box-shadow: 0 4px 14px rgba(22, 35, 60, 0.12); color: var(--color-navy); transform: translateY(-50%); transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s; }
.news-slider-btn:hover { background: #fff; }
/* Off: faded, a little smaller and pushed toward its own edge; it floats back in from there. */
.news-slider-btn.is-off { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, transform 0.3s ease, visibility 0s linear 0.3s; }
.news-slider-btn.is-prev.is-off { transform: translate(-14px, -50%) scale(0.85); }
.news-slider-btn.is-next.is-off { transform: translate(14px, -50%) scale(0.85); }
.news-slider-btn.is-prev { left: -20px; }
.news-slider-btn.is-next { right: -20px; }
/* Desktop: the slider bleeds up to 120px past the container on each side, so the
   neighbouring cards peek in (faded); the 3 main cards stay on the container grid.
   news-preview.js copies the padding into --peek and scroll-padding. */
@media (min-width: 601px) {
  .news-slider {
    margin-inline: max(calc(50% - 50vw), -120px);
    padding-inline: min(calc(50vw - 50%), 120px);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--peek, 0px), #000 calc(100% - var(--peek, 0px)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--peek, 0px), #000 calc(100% - var(--peek, 0px)), transparent);
  }
}
@media (max-width: 600px) {
  /* Mobile: bleed to the screen edges (no fade) so the next card isn't cut short of the edge. */
  .news-slider { grid-auto-columns: 85%; gap: 1rem; margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
  .news-slider-btn { display: none; }
}

/* Loading: three dots bouncing in turn while cycling pink → lavender → mint. Fades in after
   0.15s so a fast load doesn't flash it. Spans the whole grid in grid lists. */
.dots-loader { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 2.5rem 0; opacity: 0; animation: dots-in 0.2s ease 0.15s forwards; }
.dots-loader span { width: 10px; height: 10px; border-radius: 50%; background: #f3a6c8; animation: dots-bounce 1.2s ease-in-out infinite; }
.dots-loader span:nth-child(2) { animation-delay: 0.15s; }
.dots-loader span:nth-child(3) { animation-delay: 0.3s; }
caption:has(> .dots-loader) { caption-side: top; }
@keyframes dots-in { to { opacity: 1; } }
@keyframes dots-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  0% { background: #f3a6c8; }
  33% { background: #a99cf0; }
  66% { background: #7fd3b0; }
  100% { background: #f3a6c8; }
}
@media (prefers-reduced-motion: reduce) {
  .dots-loader span { animation: dots-pulse 1.2s ease-in-out infinite; }
  @keyframes dots-pulse { 50% { opacity: 0.35; } }
}

/* "もっと見る" under the news / media lists */
.list-more { display: flex; justify-content: center; margin-top: 2rem; }
.list-more button { padding: 0.6rem 2.2rem; font-size: 0.9rem; }

/* News page: the next row of articles fades out under the button, which sits on top of it. */
.list-more:has(> .news-peek:not([hidden])) { flex-direction: column; align-items: center; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.news-peek {
  width: 100%;
  max-height: 130px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}
.news-peek[hidden] { display: none; }
.news-peek:not([hidden]) + button {
  position: relative;
  margin-top: -3.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 2.4rem;
  font-weight: 700;
  background: var(--gradient-pastel);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(22, 35, 60, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.news-peek:not([hidden]) + button::after {
  content: '';
  width: 0.5em;
  height: 0.5em;
  margin-top: -0.2em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.news-peek:not([hidden]) + button:hover { background: var(--gradient-pastel); filter: brightness(0.97); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22, 35, 60, 0.2); }
.news-peek:not([hidden]) + button:hover::after { transform: translateY(3px) rotate(45deg); }

/* News page: link to the media coverage list, below a divider */
.news-media-cta { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--color-border); text-align: center; }
.news-media-cta p { margin: 0; font-size: 0.9rem; color: var(--color-muted); }
.news-media-cta a { display: inline-flex; align-items: center; gap: 0.4rem; }
.news-media-cta a svg { transition: transform 0.2s ease; }
.news-media-cta a:hover svg { transform: translateX(3px); }

/* News page: category filter + sort */
.news-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.75rem; }
.news-toolbar:empty { display: none; }
.news-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; }
/* Sort (and the mobile category picker): plain-text dropdowns (native select without the box) */
.news-sort,
.news-cat-select { field-sizing: content; appearance: none; -webkit-appearance: none; border: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23343434' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right center; padding: 0.3rem 1.3rem 0.3rem 0.2rem; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--color-navy); cursor: pointer; }
.news-sort:focus-visible,
.news-cat-select:focus-visible { outline: 2px solid var(--color-navy-light); outline-offset: 2px; border-radius: 4px; }
/* Mobile: the category chips take several rows, so a dropdown replaces them. */
.news-cat-select { display: none; }
@media (max-width: 600px) {
  /* Starts where other pages' first content does. */
  .news-toolbar { flex-wrap: nowrap; height: 2rem; margin: 0 0 1rem; }
  .news-filter { display: none; }
  .news-cat-select { display: block; }
}
.news-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.news-chip[aria-pressed="true"] { background: var(--gradient-pastel); border-color: transparent; font-weight: 700; }
/* Same look as the search page empty state (.search-empty), spanning the whole grid */
.news-filter-empty,
.list-empty { grid-column: 1 / -1; }
.news-card-body { padding: 0.9rem; }
.news-card-body time { color: var(--color-muted); font-size: 0.8rem; }
.news-card-body h3 { margin: 0.3rem 0 0; font-size: 1rem; }

/* News article. The photo's width is picked per post in admin (大 / 中 / 小); its box follows
   the photo's own proportions (no empty space around it). */
.news-article-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; font-size: 0.8rem; color: var(--color-muted); }
.news-article-cat { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--gradient-pastel); color: var(--color-navy); font-weight: 700; }
.news-detail-title { font-size: 1.75rem; line-height: 1.45; margin: 0; letter-spacing: -0.01em; }
.news-article-figure { margin: 2rem 0 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); }
.news-article-figure img { display: block; width: 100%; height: auto; }
.news-article-figure.is-m { max-width: 60%; }
.news-article-figure.is-s { max-width: 40%; }
.news-article-body { margin-top: 2.25rem; line-height: 1.95; }
.news-article-body > :first-child { margin-top: 0; }
.news-article-body p { margin: 0 0 1.1rem; }
.news-article-body h3 { display: flex; align-items: center; gap: 0.6rem; margin: 2.5rem 0 1rem; font-size: 1.05rem; line-height: 1.5; }
.news-article-body h3::before { content: ''; flex-shrink: 0; width: 4px; height: 1.1em; border-radius: 2px; background: linear-gradient(180deg, #f4b3d0, #b9b2f4, #a6dcc4); }
.news-article-body ul,
.news-article-body dl { margin: 0 0 1.1rem; padding: 1.1rem 1.4rem; border-radius: 10px; background: var(--color-bg-alt); border: 1px solid var(--color-border); }
.news-article-body ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.news-article-body li { position: relative; padding-left: 1.1rem; line-height: 1.8; }
.news-article-body li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 6px; height: 6px; border-radius: 50%; background: var(--color-navy-light); }
.news-article-body li strong { margin-right: 0.15em; }
.news-article-body dl > div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.6rem 0; line-height: 1.75; }
.news-article-body dl > div + div { border-top: 1px solid var(--color-border); }
.news-article-body dl > div:first-child { padding-top: 0; }
.news-article-body dl > div:last-child { padding-bottom: 0; }
.news-article-body dt { font-weight: 700; font-size: 0.9rem; color: var(--color-muted); }
.news-article-body dd { margin: 0; }
.news-article-body .news-article-note { font-size: 0.85rem; line-height: 1.8; color: var(--color-muted); }
@media (max-width: 600px) {
  .news-detail-title { font-size: 1.4rem; }
  .news-article-figure,
  .news-article-figure.is-m,
  .news-article-figure.is-s { margin-top: 1.5rem; max-width: 100%; }
  .news-article-body { margin-top: 1.75rem; }
  .news-article-body ul,
  .news-article-body dl { padding: 1rem 1.1rem; }
  .news-article-body dl > div { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* News detail: previous / next article */
.news-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.news-pager-link { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0.9rem 1.1rem; border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-navy); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.news-pager-link:hover { border-color: var(--color-border-strong); box-shadow: 0 4px 16px rgba(22, 35, 60, 0.06); text-decoration: none; }
.news-pager-link.is-next { align-items: flex-end; text-align: right; }
.news-pager-label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.news-pager-label svg { transition: transform 0.2s ease; }
.news-pager-link.is-prev:hover .news-pager-label svg { transform: translateX(-3px); }
.news-pager-link.is-next:hover .news-pager-label svg { transform: translateX(3px); }
.news-pager-title { max-width: 100%; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-links { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border); }
.related-links h4 { margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--color-muted); }
.related-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.related-links a { font-size: 0.9rem; word-break: break-all; }
.related-links a:hover { text-decoration: underline; }

/* Quicklinks (TOP) */
.quicklink-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.quicklink-card {
  display: block;
  color: inherit;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quicklink-card:hover { box-shadow: 0 8px 20px rgba(22, 35, 60, 0.1); transform: translateY(-2px); }
.quicklink-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
}
.quicklink-icon img { width: 20px; height: 20px; object-fit: contain; }
.quicklink-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.quicklink-card p { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 0.75rem; }
.quicklink-arrow { display: inline-flex; color: var(--color-navy-soft); transition: transform 0.2s ease; }
.quicklink-card:hover .quicklink-arrow { transform: translateX(4px); }

/* Company info table */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--color-border); }
.info-table th {
  width: 180px;
  text-align: left;
  padding: 0.9rem 1rem 0.9rem 0;
  color: var(--color-muted);
  font-weight: 700;
  font-size: 0.9rem;
  vertical-align: top;
}
.info-table td { padding: 0.9rem 0; }
.info-address { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.map-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 0.75rem;
  color: var(--color-navy);
  white-space: nowrap;
}
.map-btn:hover { background: var(--color-bg); text-decoration: none; }

/* History */
.history-table { width: 100%; border-collapse: collapse; }
.history-table tr { border-top: 1px solid var(--color-border); }
.history-table tr.history-cont { border-top: none; }
.history-table th {
  width: 180px;
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.history-table td { padding: 0.75rem 0; }
/* Footnote under an event (e.g. the period and category behind a "No. 1"). */
.history-note { font-size: 10px; line-height: 1.5; color: #6b7280; margin-top: 0.2rem; white-space: pre-line; }
.history-table tr.history-cont th,
.history-table tr.history-cont td { padding-top: 0; }

/* Content written in both languages: show the block matching the current language. */
html[lang="en"] .lang-block[lang="ja"],
html:not([lang="en"]) .lang-block[lang="en"] { display: none; }

/* Message block */
.message-block { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }
.message-photo {
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.message-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.message-block h3 { font-size: 1.3rem; margin: 0.3rem 0 1rem; }
.message-signature { margin-top: 1rem; font-weight: 700; }

/* Org chart */
.org-chart { display: flex; flex-direction: column; align-items: center; }
.org-ceo {
  background: var(--gradient-pastel);
  color: #343434;
  padding: 0.7rem 2rem;
  border-radius: 6px;
  font-weight: bold;
  position: relative;
  margin-bottom: 1.5rem;
}
.org-ceo::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 1.5rem;
  background: var(--color-border-strong);
}
.org-tree { display: flex; justify-content: center; }
.org-node {
  position: relative;
  padding: 1.5rem 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--color-border-strong);
}
/* Outer nodes: the bar and the drop become one rounded corner (the drop ::after is hidden). */
.org-node:first-child::before,
.org-node:last-child::before { height: 1.5rem; }
.org-node:first-child::before { left: 50%; border-left: 1px solid var(--color-border-strong); border-top-left-radius: 8px; }
.org-node:last-child::before { right: calc(50% - 1px); border-right: 1px solid var(--color-border-strong); border-top-right-radius: 8px; }
.org-node:first-child::after,
.org-node:last-child::after { display: none; }
.org-node:only-child::before { display: none; }
.org-node::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.5rem;
  background: var(--color-border-strong);
}
.org-child {
  position: relative;
  margin-top: 1.5rem;
}
.org-child::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: 50%;
  width: 1px;
  height: 1.5rem;
  background: var(--color-border-strong);
}
.org-box { background: var(--color-bg-alt); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(22, 35, 60, 0.1); border-radius: 6px; padding: 0.7rem 1.3rem; font-size: 0.9rem; box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06); text-align: center; }
.org-box.muted { color: var(--color-muted); }

/* Brand cards */
/* --brand-cols is set by js/business.js: 4 per row up to 4 brands, two even rows beyond. */
.brand-grid { display: grid; grid-template-columns: repeat(var(--brand-cols, 4), 1fr); gap: 1.5rem; }
.brand-link-wrap { position: relative; height: 100%; }
.brand-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-card:hover { box-shadow: 0 8px 20px rgba(22, 35, 60, 0.1); transform: translateY(-2px); text-decoration: none; }
@media (min-width: 601px) {
  .brand-link-wrap:hover .link-warning { opacity: 1; transform: translate(-50%, 0); }
}
.brand-card-img {
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}
.brand-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-card-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.brand-card-body h3 { margin: 0 0 0.5rem; }
.brand-card-body h3:has(.brand-tag) { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.brand-card-body p { margin: 0; font-size: 0.9rem; color: var(--color-muted); }

/* Channels */
/* --channel-cols is set by js/business.js: one row up to 5 channels, two rows beyond. */
.channel-grid { display: grid; grid-template-columns: repeat(var(--channel-cols, 5), 1fr); gap: 1rem; }
.channel-card { background: #fff; border: 1px solid rgba(22, 35, 60, 0.1); border-radius: 10px; padding: 1.3rem 0.8rem; text-align: center; box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06); }
.channel-count-tag { background: #fff; }
.channel-card strong { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; }
.channel-card span { font-size: 0.8rem; color: var(--color-muted); }

/* Media list */
.media-list { border-top: 1px solid var(--color-border); }
.media-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.media-row:hover { opacity: 0.6; }
.media-tag { display: inline-block; margin-right: 0.5em; padding: 0.05rem 0.45rem; border: 1px solid var(--color-border-strong); border-radius: 4px; font-size: 0.75em; font-weight: 700; line-height: 1.5; color: var(--color-muted); vertical-align: 0.12em; white-space: nowrap; }
.media-row time { color: var(--color-muted); font-size: 0.85rem; white-space: nowrap; }

/* Media modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 35, 60, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(22, 35, 60, 0.25);
  padding: 2.5rem;
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-navy);
  padding: 0.4rem;
}
.modal-box time { color: var(--color-muted); font-size: 0.85rem; }
.modal-box h3 { margin: 0.4rem 0 0.8rem; font-size: 1.15rem; }
.modal-box p { margin: 0; font-size: 0.95rem; color: var(--color-navy-soft); }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* While a popup is open the page behind it does not scroll (js/i18n.js adds html.modal-locked,
   and also cancels swipes that start on the dimmed background); tapping the background still
   closes the popup. scrollbar-gutter keeps the page from jumping sideways on desktop. */
html.modal-locked,
html.modal-locked body { overflow: hidden; }
html.modal-locked { scrollbar-gutter: stable; }
.modal-overlay { overscroll-behavior: contain; }

/* Media popup: like the privacy one, the box itself does not scroll. The title stays put with the
   close button and only the text scrolls, its slim scrollbar set in from the rounded corners. */
.modal-box-scroll { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modal-head { padding: 1.9rem 3.5rem 0.8rem 2.5rem; }
.modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0.6rem 1rem 0;
  padding: 0 1.4rem 0.5rem 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
.modal-scroll::-webkit-scrollbar { width: 8px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-scroll::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 999px; }
@media (max-width: 600px) {
  .modal-head { padding: 1.6rem 3rem 0.6rem 1.4rem; }
  .modal-scroll { margin-right: 0.35rem; padding: 0 0.9rem 0.5rem 1.4rem; }
}

/* Privacy policy popup (contact form): the page's .policy text inside a scrolling modal. */
/* The box itself does not scroll: the title and the close button stay put and only the text
   area scrolls, with its slim scrollbar set in from the rounded corners. */
.modal-box-policy { max-width: 760px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modal-box-policy h3 { margin: 0; padding: 1.9rem 3.5rem 0.9rem 2.5rem; font-size: 1.3rem; }
.modal-box-policy > .policy {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0.6rem 1rem 0;
  padding: 0 1.4rem 1rem 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
.modal-box-policy > .policy::-webkit-scrollbar { width: 8px; }
.modal-box-policy > .policy::-webkit-scrollbar-track { background: transparent; }
.modal-box-policy > .policy::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 999px; }
.modal-box-policy .policy { line-height: 1.8; font-size: 0.92rem; }
.modal-box-policy > .policy > article > :first-child { margin-top: 0; }
.modal-box-policy .policy h2 { font-size: 1.02rem; margin: 1.8rem 0 0.6rem; }
.modal-box-policy .policy p,
.modal-box-policy .policy ul { font-size: inherit; color: var(--color-navy-soft); margin: 0 0 0.9rem; }
@media (max-width: 600px) {
  .modal-box-policy h3 { padding: 1.6rem 3rem 0.7rem 1.4rem; }
  .modal-box-policy > .policy { margin-right: 0.35rem; padding: 0 0.9rem 0.5rem 1.4rem; }
}
/* "Moving to an external page" confirm popups (mobile: contact CUSTOMER card, business brand
   cards): icon on top, centered text, two equal pill buttons side by side. */
.modal-confirm { max-width: 360px; padding: 2.25rem 1.5rem 1.5rem; border-radius: 20px; text-align: center; }
.modal-confirm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--gradient-pastel);
  color: var(--color-navy);
}
.modal-box.modal-confirm p { margin: 0 0 1.6rem; font-size: 1rem; line-height: 1.7; color: var(--color-navy); text-wrap: balance; }
.modal-confirm .modal-actions { gap: 0.6rem; margin-top: 0; flex-wrap: nowrap; }
.modal-confirm .modal-actions > * {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: center;
}
.modal-confirm .modal-actions > .btn-outline-light { background: #fff; transition: background 0.15s ease; }
.modal-confirm .modal-actions > .btn-outline-light:hover { background: var(--color-bg); }
.modal-confirm .modal-actions > .btn-solid-light { border: 1px solid transparent; box-shadow: 0 6px 16px rgba(22, 35, 60, 0.12); }
.modal-overlay.open .modal-confirm { animation: modal-confirm-in 0.2s ease; }
@keyframes modal-confirm-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-overlay.open .modal-confirm { animation: none; } }

/* Contact */
.contact-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.contact-cat-wrap { position: relative; }
.contact-cat-wrap > .contact-cat-card { height: 100%; }
.link-warning {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 240px;
  margin: 0;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-muted);
  text-align: left;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.1);
  opacity: 0;
  transform: translate(-50%, -4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}
@media (min-width: 601px) {
  .contact-cat-wrap:hover .link-warning { opacity: 1; transform: translate(-50%, 0); }
}
.contact-cat-card {
  /* Flex column: content starts at the top (buttons otherwise center it vertically). */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--color-bg-alt);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22, 35, 60, 0.1);
  border-radius: 8px;
  padding: 1.3rem;
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, border-width 0.2s ease, padding 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.contact-cat-card:hover { box-shadow: 0 8px 20px rgba(22, 35, 60, 0.1); text-decoration: none; }
.contact-cat-card:focus { outline: none; }
.contact-cat-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-navy-light), 0 6px 20px rgba(22, 35, 60, 0.06);
}
/* The selected card: a 2px outline in the brand's pastel-to-coral colors plus a check mark in its top-right corner. */
.contact-cat-card.active {
  position: relative;
  border: 2px solid transparent;
  padding: calc(1.3rem - 1px);
  background: linear-gradient(#f6f7f9, #f6f7f9) padding-box, linear-gradient(120deg, #f08a7e, #e57fa8, #a28be6, #f0aa72) border-box;
}
.contact-cat-check {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(120deg, #f08a7e, #e57fa8, #a28be6, #f0aa72);
  color: #fff;
}
.contact-cat-card.active h3 { padding-right: 1.8rem; }
.contact-cat-label { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--color-navy-soft); font-weight: bold; }
.contact-cat-card h3 { margin: 0.4rem 0 0.6rem; font-size: 1rem; }
.contact-cat-card p { font-size: 0.85rem; color: var(--color-muted); margin: 0; }

.contact-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
.contact-form-wrap { position: relative; }
.contact-form fieldset { border: none; padding: 0; margin: 0; min-width: 0; }
.contact-form .botcheck { display: none; }
.form-status { margin: 0.75rem 0 0; font-size: 0.85rem; min-height: 1.2em; }
.form-status.is-success { color: #2f7a4f; }
.form-status.is-error { color: #b3261e; }
.contact-form .field { margin-bottom: 1.2rem; }
.contact-form label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: 700; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-bg);
  font: inherit;
  color: var(--color-navy);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-navy-light);
  outline-offset: 1px;
}
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23343434' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.address-box { background: var(--color-bg-alt); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(22, 35, 60, 0.1); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06); }
.address-box h3 { margin: 0 0 0.8rem; font-size: 1rem; }
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-muted);
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row a { color: inherit; }
.postal-badge,
.weekday-badge,
.brand-tag {
  display: inline-block;
  border: 1px solid var(--color-border-strong);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  font-size: 0.85em;
  color: var(--color-muted);
  font-weight: 400;
  vertical-align: middle;
}
.info-note { display: block; font-size: 0.8em; color: var(--color-muted); margin-top: 0.25rem; }
.info-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-embed {
  width: 100%;
  height: 220px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: block;
}

.footer-info-row { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.5rem 0; font-size: 0.8rem; color: #4a5568; }
.footer-info-row a { color: inherit; }
.footer-info-row svg { flex-shrink: 0; opacity: 0.8; margin-top: 0.15em; }
.footer-info-note { display: block; font-size: 0.85em; color: #6b7280; margin-top: 0.2rem; }
.footer-info-row .postal-badge,
.footer-info-row .weekday-badge {
  color: #343434;
  border-color: rgba(52, 52, 52, 0.3);
}

/* Footer */
footer.site-footer {
  background: var(--color-bg);
  color: #4a5568;
  padding: 2.5rem 0 1.5rem;
}
footer.site-footer a { color: #4a5568; }
footer.site-footer a:hover { color: #343434; }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 0; }
.footer-brand h3 { color: #343434; margin: 0 0 0.6rem; font-size: 1rem; }
.footer-right-group { display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { color: #6b7280; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; margin: 0 0 0.8rem; }
.footer-col a { display: block; margin-bottom: 0.5rem; font-size: 0.8rem; }
.footer-brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  text-align: center;
  /* The faint top border reads lower than it is next to the COMPANY / CONTACT headings. */
  margin-top: -4px;
}
.footer-brand-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(52, 52, 52, 0.15);
  border-radius: 8px;
  padding: 1rem 1.75rem;
}
.footer-brand-link:hover .footer-brand-box { background: rgba(255, 255, 255, 0.8); }
.footer-brand-link img { height: 20px; width: auto; filter: none; }
.footer-brand-caption { font-size: 0.65rem; color: #4a5568; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid rgba(52, 52, 52, 0.15);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.footer-policy { display: flex; justify-content: flex-end; gap: 1rem; line-height: 1.2; margin-bottom: 0.3rem; }
.footer-policy-link { font-size: 0.7rem; color: #6b7280; }
.footer-policy-link:hover { text-decoration: underline; }
/* The logo mark at the right end is plain decoration. The admin page is reached through the
   copyright line (js/i18n.js, initAdminEntry), which is deliberately styled as ordinary text:
   no pointer cursor, no hover effect, no link target shown by the browser. */
.footer-logo-mark { display: flex; align-items: center; margin-left: auto; }
.footer-copyright { cursor: default; -webkit-tap-highlight-color: transparent; }

/* Cookie policy page */
.policy { line-height: 1.9; }
.policy h2 { font-size: 1.15rem; margin: 2.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--color-border); }
.policy p, .policy ul { margin: 0 0 1rem; }
.policy a { text-decoration: underline; }
.policy-date { color: var(--color-muted); font-size: 0.9rem; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.75rem 0.65rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(22, 35, 60, 0.12);
  font-size: 0.8rem;
  line-height: 1.55;
  animation: cookie-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cookie-slide-up {
  from { transform: translateY(calc(100% + 1rem)); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .cookie-banner { animation: none; } }
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { text-decoration: underline; }
.cookie-banner button {
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  background: var(--color-border);
  color: var(--color-navy);
  font: inherit;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}
.cookie-banner button:hover { background: var(--color-border-strong); }
.footer-logo-mark img {
  height: 26px;
  width: auto;
  filter: none;
  opacity: 0.25;
}

/* Admin */
.hidden { display: none !important; }

.admin-page {
  background: linear-gradient(160deg, #fdf1f7 0%, #eef0fb 45%, #ecf8f1 100%);
  min-height: 100vh;
}
.admin-page main {
  padding-top: 4rem;
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.admin-brand {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 2rem;
}
.admin-back {
  justify-self: start;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.admin-back:hover { color: var(--color-navy); opacity: 1; }
.admin-brand-logo {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.admin-brand-logo img { height: 30px; width: auto; }
.admin-brand-logo span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

/* Login / PC-only screens: the box sits in the middle of the window; the logo row stays on top. */
.admin-centered main {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.admin-centered .admin-brand {
  position: absolute;
  top: 4rem;
  left: 2rem;
  right: 2rem;
  margin-bottom: 0;
}
.admin-centered .admin-box { width: 100%; }
.admin-centered #status-message:empty { display: none; }

.admin-notice {
  max-width: 420px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin: 1rem auto 0;
}

.admin-warning { display: flex; align-items: flex-start; justify-content: center; gap: 0.5rem; max-width: 760px; font-size: 0.8rem; color: #9a5b00; text-align: left; }
.admin-warning svg { flex-shrink: 0; margin-top: 0.1em; }

#status-message { text-align: center; font-size: 0.9rem; min-height: 1.3em; margin-bottom: 1rem; }
#status-message.error { color: #b3261e; }
/* Login: wrong-password tries left before the lockout */
.lock-badge { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.55rem; border: 1px solid #b3261e; border-radius: 4px; background: rgba(179, 38, 30, 0.08); font-size: 0.8rem; font-weight: 700; vertical-align: 0.05em; }

.admin-box {
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(22, 35, 60, 0.1);
  text-align: center;
}
.admin-box h1 { font-size: 1.3rem; margin: 0 0 0.4rem; }
.admin-box p { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.admin-box label { display: block; text-align: left; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.4rem; }
.admin-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  background: var(--color-bg);
  font: inherit;
  color: var(--color-navy);
}
.admin-box input:focus { outline: 2px solid var(--color-navy-light); outline-offset: 1px; }
/* Locked login: the field is disabled and shows a small padlock in its middle. */
.password-wrap { position: relative; }
.password-lock { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--color-muted); pointer-events: none; }
.password-wrap:has(input:disabled) .password-lock { display: block; }
.admin-box input:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-box input:disabled::placeholder { color: transparent; }
.admin-box .password-case-note { margin: 0.4rem 0 0; font-size: 0.75rem; text-align: left; }
/* Small text-style buttons under the login form (resend the code, change the address, ...). */
.admin-box .login-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 1.1rem 0 0; font-size: 0.8rem; }
.admin-box .link-btn { padding: 0; border: none; border-radius: 0; background: none; color: var(--color-muted); font-size: 0.8rem; text-decoration: underline; cursor: pointer; }
.admin-box .link-btn:hover { background: none; color: var(--color-navy); }
.admin-box .link-btn:disabled { opacity: 0.45; cursor: default; text-decoration: none; }
.admin-box .form-actions { justify-content: center; margin-top: 1.5rem; }

.admin-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(22, 35, 60, 0.1);
  padding: 2.25rem 2.75rem 2.75rem;
}

.manager-header-top { margin-bottom: 2rem; }
.manager-header-top h1 { font-size: 1.4rem; margin: 0; }

/* Spacing between the visible sections only (tabs hide the rest). */
.admin-section:not([hidden]) ~ .admin-section:not([hidden]) { margin-top: 2.5rem; }
.password-fields { max-width: 360px; display: grid; gap: 0.75rem; }
.backup-controls { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.backup-controls select { padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: #fff; font: inherit; font-size: 0.9rem; }
.admin-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.admin-tab-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
/* Backups sit apart on the right, behind a divider. */
.admin-tab-empty { margin: 0; text-align: center; }
/* Backup lives outside the panel, under it. */
.admin-backup-link { display: flex; justify-content: center; gap: 0.5rem; margin: 1.25rem auto 0; }
.admin-backup-link button { padding: 0.45rem 1.1rem; border-radius: 999px; font-size: 0.85rem; }
.admin-backup-link button[aria-selected="true"] { background: var(--gradient-pastel); border-color: transparent; font-weight: 700; }
.admin-tabs-more { flex-basis: 100%; padding: 0.6rem 0.8rem; border: 1px dashed var(--color-border-strong); border-radius: 10px; }
.admin-tabs-more summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--color-muted); }
.admin-tabs-more[open] summary { margin-bottom: 0.6rem; }
/* その他: one row per site page, its items as tabs */
.admin-tab-page { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; }
.admin-tab-page + .admin-tab-page { border-top: 1px solid var(--color-border); }
.admin-tab-page-label { flex: 0 0 5.5rem; font-size: 0.8rem; font-weight: 700; color: var(--color-muted); }
.admin-tabs .admin-tab-page button { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.admin-tabs button { padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.9rem; }
.admin-tabs button[aria-selected="true"] { background: var(--gradient-pastel); border-color: transparent; font-weight: 700; }

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.manager-header h2 { font-size: 1.05rem; margin: 0; }

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-row:hover { border-color: var(--color-border-strong); box-shadow: 0 4px 16px rgba(22, 35, 60, 0.06); }
.admin-row time { display: block; color: var(--color-muted); font-size: 0.8rem; }
.admin-row strong { font-size: 0.95rem; }
.admin-row-actions { display: flex; gap: 0.5rem; white-space: nowrap; }
/* Jobs list: 募集中 / 募集終了 groups */
.admin-group-title { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--color-muted); }
.admin-group-divider { border: none; border-top: 1px solid var(--color-border-strong); margin: 1.5rem 0 1.25rem; }
.admin-row.is-ended > div:first-child { opacity: 0.55; }

.admin-hint { margin: -0.4rem 0 1rem; font-size: 0.8rem; color: var(--color-muted); }
/* News editor: body writing guide + live preview */
.body-help { display: flex; flex-direction: column; gap: 0.6rem; margin: -0.4rem 0 1.2rem; }
.body-help-box { border: 1px solid var(--color-border); border-radius: 8px; background: #fff; padding: 0.7rem 1rem; }
.body-help-box summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; }
.body-help-box[open] summary { margin-bottom: 0.8rem; }
.body-help-table { width: 100%; border-collapse: collapse; margin-bottom: 0.8rem; font-size: 0.85rem; }
.body-help-table th, .body-help-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.body-help-table th { width: 45%; font-weight: 700; }
.body-help-example { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.body-help-caption { margin: 0 0 0.4rem; font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.body-help-example pre { margin: 0; padding: 0.9rem 1rem; border-radius: 8px; background: var(--color-bg); font: inherit; font-size: 0.8rem; line-height: 1.8; white-space: pre-wrap; }
.body-help .news-article-body { margin-top: 0; font-size: 0.85rem; }
.body-help .news-article-body dl > div { grid-template-columns: 5rem 1fr; }
#body-preview, #body-preview-en { max-height: 420px; overflow-y: auto; }
@media (max-width: 600px) { .body-help-example { grid-template-columns: 1fr; } }
/* Wide screens, news: the body and its guide/preview side by side; the guide/preview column
   stays in view while scrolling. */
@media (min-width: 1100px) {
  .is-news .body-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .is-news .body-row .field { margin-bottom: 0; }
  .is-news #field-body { min-height: 560px; }
  .is-news .body-help { position: sticky; top: 1rem; margin: 0; max-height: calc(100vh - 2rem); overflow-y: auto; }
  .is-news #field-body-en { min-height: 360px; }
  .is-news #body-preview, .is-news #body-preview-en { max-height: none; }
  .is-news .body-help-example { grid-template-columns: 1fr; }
  .is-news .body-row { margin-bottom: 1.3rem; }
}
.admin-history-list { display: grid; gap: 0.4rem; }
.history-edit-row { display: grid; grid-template-columns: 7.5rem 6.5rem 1fr 1fr auto; gap: 0.4rem; align-items: center; }
.history-edit-head { font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.history-edit-row input { min-width: 0; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-bg); font: inherit; font-size: 0.85rem; color: var(--color-navy); }
/* The note row sits right under its event: the label spans the two date columns, the two note boxes line up under the event boxes. */
.history-edit-note { align-items: start; margin: -0.1rem 0 0.55rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--color-border); }
.history-edit-note-label { grid-column: 1 / 3; font-size: 0.75rem; color: var(--color-muted); padding-top: 0.5rem; }
.history-edit-note textarea { min-width: 0; resize: vertical; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-bg); font: inherit; font-size: 0.8rem; line-height: 1.4; color: var(--color-navy); }
.history-edit-actions { display: flex; gap: 0.3rem; }
.history-edit-actions button { padding: 0.3rem 0.55rem; font-size: 0.8rem; }
.history-add-btn { margin-top: 0.75rem; }
.admin-org { display: grid; gap: 0.6rem; }
.admin-stats { display: grid; gap: 0.4rem; }
.le-list { display: grid; gap: 0.75rem; }
.le-item { padding: 0.9rem 1rem 1rem; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-alt); }
.le-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.le-num { font-size: 0.8rem; font-weight: 700; color: var(--color-muted); }
.le-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 0.75rem; }
.le-field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.le-field > span { font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.le-wide { grid-column: 1 / -1; }
.le-field input[type="text"],
.le-field input[type="password"],
.le-field select,
.le-field textarea { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: #fff; font: inherit; font-size: 0.85rem; color: var(--color-navy); }
.le-field textarea { resize: vertical; line-height: 1.6; }
.le-image { grid-column: 1 / -1; }
/* 代表挨拶: the CEO photo (square, as on the site) with its change button */
.message-photo-field { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; }
.message-photo-field img { width: 140px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg); }
.message-photo-label { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; font-weight: 700; }
.message-photo-field .admin-hint { margin: 0 0 0.75rem; }
.le-image img,
.le-noimage { width: 240px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--color-border); background: #fff; }
.le-noimage { display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--color-muted); }
.le-image input[type="file"] { font-size: 0.8rem; }
.stats-edit-row { display: grid; grid-template-columns: 7rem 1.5rem 1fr 1fr; gap: 0.5rem; align-items: center; }
.stats-edit-head { font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
/* One figure = its main row plus a note row under it (the note inputs line up under the labels). */
.stats-edit-item { display: grid; gap: 0.35rem; padding-bottom: 0.7rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--color-border); }
.stats-edit-note-label { grid-column: 1 / 3; font-size: 0.75rem; color: var(--color-muted); align-self: start; padding-top: 0.55rem; }
.stats-edit-note { align-items: start; }
.stats-edit-note textarea { min-width: 0; resize: vertical; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-bg); font: inherit; font-size: 0.85rem; line-height: 1.4; color: var(--color-navy); }
.stats-edit-row input[type="text"] { min-width: 0; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-bg); font: inherit; font-size: 0.85rem; color: var(--color-navy); }
.org-edit-dept { padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-alt); display: grid; gap: 0.4rem; }
.org-edit-row { display: grid; grid-template-columns: 4.5rem 1fr 1fr auto; gap: 0.4rem; align-items: center; }
.org-edit-child { grid-template-columns: 4.5rem 1fr 1fr auto auto; padding-left: 1rem; }
.org-edit-label { font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.org-edit-row input[type="text"] { min-width: 0; padding: 0.5rem 0.6rem; border: 1px solid var(--color-border-strong); border-radius: 8px; background: #fff; font: inherit; font-size: 0.85rem; color: var(--color-navy); }
.org-edit-child .checkbox-label { font-size: 0.75rem; white-space: nowrap; }
.org-edit-child > button,
.org-edit-add-child { justify-self: start; padding: 0.3rem 0.6rem; font-size: 0.75rem; }
.org-edit-add-child { margin-left: 1rem; }
.admin-hero-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.admin-hero-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--color-muted);
}
.admin-hero-item img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: #fff; }
.admin-hero-order { display: flex; align-items: center; gap: 0.6rem; }
.admin-hero-order button { padding: 0.2rem 0.6rem; line-height: 1.2; }

.admin-form h1 { font-size: 1.3rem; margin: 0 0 1.75rem; }

.field { margin-bottom: 1.3rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }

.admin-form label {
  display: block;
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  font: inherit;
  color: var(--color-navy);
}
.admin-form input[type="text"]:focus,
.admin-form input[type="url"]:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: 2px solid var(--color-navy-light);
  outline-offset: 1px;
}

.admin-form textarea { min-height: 160px; resize: vertical; }

.admin-form .image-hint { margin: 0.4rem 0 0; }
/* "任意" etc. after a field label */
.label-opt { margin-left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--color-bg); border: 1px solid var(--color-border); font-size: 0.7rem; font-weight: 400; color: var(--color-muted); vertical-align: 0.1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Related links: three URL boxes with a link icon */
.link-inputs { display: flex; flex-direction: column; gap: 0.5rem; }
.link-input-row { position: relative; }
.link-input-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.admin-form .link-input-row input { padding-left: 2.4rem; }

/* News photo: drop zone / current picture, then the size cards */
.admin-form .image-drop { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin: 0; padding: 1.75rem 1rem; border: 1.5px dashed var(--color-border-strong); border-radius: 12px; background: var(--color-bg); color: var(--color-muted); text-align: center; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.admin-form .image-drop:hover,
.admin-form .image-drop.is-over { border-color: var(--color-navy-light); background: #fff; }
.image-drop-title { font-size: 0.9rem; font-weight: 700; color: var(--color-navy); }
.image-drop-sub { font-size: 0.75rem; font-weight: 400; }
.image-current { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.admin-form .image-current img { max-width: 280px; max-height: 200px; margin: 0; border: 1px solid var(--color-border); border-radius: 10px; }
.image-current-actions { display: flex; gap: 0.5rem; }
.image-btn { display: inline-flex; align-items: center; margin: 0; padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--color-border-strong); background: #fff; font-size: 0.8rem; font-weight: 700; color: var(--color-navy); cursor: pointer; }
.image-btn:hover { background: var(--color-bg); }
.image-btn.is-danger { color: #b3261e; border-color: rgba(179, 38, 30, 0.45); }
.image-btn.is-danger:hover { background: rgba(179, 38, 30, 0.06); }
.admin-form .image-size-label { margin: 1.1rem 0 0.5rem; font-size: 0.85rem; font-weight: 700; }
.image-size-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; max-width: 520px; }
.admin-form .size-opt { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; padding: 0.75rem 0.85rem; border: 1px solid var(--color-border-strong); border-radius: 10px; background: #fff; font-weight: 400; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-demo { display: block; height: 26px; margin-bottom: 0.2rem; padding: 5px; border-radius: 5px; background: var(--color-bg); }
.size-demo span { display: block; height: 100%; border-radius: 3px; background: var(--color-navy-light); }
.size-name { font-size: 0.9rem; font-weight: 700; }
.size-note { font-size: 0.7rem; color: var(--color-muted); }
.admin-form .size-opt:hover { border-color: var(--color-navy-light); }
.admin-form .size-opt:has(input:checked) { border: 1.5px solid var(--color-navy); background: var(--color-bg); }
.size-opt:has(input:focus-visible) { outline: 2px solid var(--color-navy-light); outline-offset: 2px; }

.admin-form img { max-width: 240px; display: block; margin-top: 0.75rem; border-radius: 10px; }

.checkbox-label { display: flex !important; align-items: center; gap: 0.4rem; font-weight: 400 !important; margin-top: 0.6rem; }

button {
  font: inherit;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-navy);
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}
button:hover { background: var(--color-bg-alt); }
button.primary { background: var(--gradient-pastel); color: #343434; border-color: transparent; font-weight: 700; }
button.primary:hover { filter: brightness(0.95); }
.admin-page button:disabled { opacity: 0.45; cursor: not-allowed; }
button.danger { color: #b3261e; border-color: #b3261e; background: transparent; }
button.danger:hover { background: rgba(179, 38, 30, 0.08); }

.form-actions { margin-top: 1.75rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  /* Single column: drop the frame, show the slide full-bleed and sit the text at the bottom. */
  .hero { align-items: flex-end; min-height: 100svh; padding-bottom: 1.5rem; } /* bottom gap = side gutter */
  .hero-visual { display: none; }
  .hero-bg { opacity: 1; filter: none; transform: none; }
  .hero-bg img { object-position: center top; }
  .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 40%, rgba(255, 255, 255, 0) 70%);
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
  .stats-grid > div:nth-child(odd) { border-left: none; padding-left: 0; }
  .stats-grid > div:nth-child(n+3) { border-top: 1px solid var(--color-border); padding-top: 1.5rem; }
  .quicklink-grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-cat-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .message-block { grid-template-columns: 1fr; }
  .message-photo { max-width: 240px; }
  .org-ceo { margin-bottom: 1rem; }
  .org-ceo::after { display: none; }
  .org-tree {
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    gap: 0.6rem;
    position: relative;
  }
  /* CEO center == tree center (both centered), so this bridges the CEO's drop over to the
     left rail: ┘ at the CEO, ┌ at the rail, 6px radii. It's drawn as background layers of
     ONE box (16px tall, line at y=8) — two separately positioned boxes rounded their
     shared line to different device pixels on high-DPR phones and visibly misaligned. */
  .org-tree::before {
    --c: var(--color-border-strong);
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: calc(50% + 1px);
    height: 1rem;
    background:
      linear-gradient(var(--c), var(--c)) right 0 top 0 / 1px 3px no-repeat,
      radial-gradient(circle at 0 0, transparent 4.6px, var(--c) 5px, var(--c) 5.6px, transparent 6px) right 0 top 3px / 6px 6px no-repeat,
      linear-gradient(var(--c), var(--c)) 6px 8px / calc(100% - 12px) 1px no-repeat,
      radial-gradient(circle at 6px 6px, transparent 4.6px, var(--c) 5px, var(--c) 5.6px, transparent 6px) 0 8px / 6px 6px no-repeat,
      linear-gradient(var(--c), var(--c)) 0 14px / 1px 2px no-repeat;
  }
  .org-node { padding: 0; align-items: flex-start; gap: 0.5rem; }
  .org-node::after { display: none; }
  /* rail segment per node, spanning into the gap below; last node stops at its box via the elbow */
  .org-node::before {
    top: 0;
    bottom: -0.6rem;
    left: 0;
    right: auto;
    width: 1px;
    border-top: none;
    background: var(--color-border-strong);
  }
  .org-node:first-child::before { left: 0; height: auto; border-left: none; border-radius: 0; }
  .org-node:last-child::before { display: none; }
  /* offsets undo the box's 1px border (abs. pos. is from the padding edge) so the elbow lines up with the rail */
  .org-node:last-child > .org-box::before {
    top: -2px;
    left: calc(-1.25rem - 1px);
    width: calc(1.25rem + 1px);
    height: calc(50% + 3px);
    background: none;
    border-left: 1px solid var(--color-border-strong);
    border-bottom: 1px solid var(--color-border-strong);
    border-bottom-left-radius: 6px;
  }
  .org-node > .org-box {
    position: relative;
    width: fit-content;
    margin-left: 1.25rem;
  }
  .org-node > .org-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -1.25rem;
    width: 1.25rem;
    height: 1px;
    background: var(--color-border-strong);
  }
  .org-child { margin: 0 0 0 3.5rem; position: relative; }
  .org-child .org-box {
    position: relative;
    width: fit-content;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }
  /* Rail continues from this box's elbow down to the next box under the same department. */
  .org-child:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    bottom: -0.6rem;
    left: -1rem;
    border-left: 1px solid var(--color-border-strong);
  }
  .org-child::before {
    content: '';
    position: absolute;
    top: -0.6rem;
    left: -1rem;
    width: 1rem;
    height: calc(0.6rem + 50%);
    background: none;
    border-left: 1px solid var(--color-border-strong);
    border-bottom: 1px solid var(--color-border-strong);
    border-bottom-left-radius: 6px;
  }
}

@media (max-width: 600px) {
  header.site-header {
    left: 0.75rem;
    right: 0.75rem;
    border-radius: 24px;
  }
  .header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding: 0.7rem 1.1rem;
  }
  .menu-toggle { display: flex; justify-self: start; }
  .logo { justify-self: center; justify-items: center; }
  .header-right { justify-self: end; }
  .header-mobile-nav-inner { padding-left: 1.6rem; padding-right: 1.1rem; }
  .desktop-nav { display: none; }
  .lang-switch { display: none; }
  .lang-dropdown { display: block; }
  .footer-right-group { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .footer-cols { display: contents; }
  .admin-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .admin-brand { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
  .admin-back { justify-self: auto; }
  .hero h1 { font-size: 2.1rem; }
  .page-header h1,
  .page-header .page-title { font-size: 1.75rem; }
  .mobile-break { display: block; }
  .desktop-only { display: none; }
  .cookie-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; gap: 0.75rem; font-size: 0.75rem; }
  .mobile-only { display: inline; }
  .mobile-tight { letter-spacing: -0.09em; }
  .history-table th { width: 6.5rem; }
  /* Wide enough for the longest label (メールアドレス) on one line. */
  .info-table th { width: 7.5rem; }
  .info-address { flex-direction: column; gap: 0.5rem; }
  /* The head's right-side item (View All button, channel count) pinned top-right beside the
     label, so a long title can use the full width. */
  .section-head { position: relative; }
  .section-head > .btn-outline-light,
  .section-head > .channel-count-tag { position: absolute; top: -0.25rem; right: 0; }
  .section-head > .btn-outline-light { padding: 0.25rem 0.75rem; font-size: 0.75rem; }
  .page-header .section-head > .btn-outline-light { top: 50%; transform: translateY(-50%); } /* beside a one-line h1 */
  .admin-box, .admin-panel { padding: 1.75rem 1.25rem; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .brand-grid { grid-template-columns: 1fr; }
}

/* The clear (×) button of search fields: dark gray instead of the browser's blue. */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-left: 0.4rem;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Header search (desktop nav only; the nav is hidden on mobile). The field opens on hover/focus. */
.nav-search { display: flex; align-items: center; margin-left: 0.25rem; border-radius: 999px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--color-border); }
.nav-search input {
  width: 0;
  padding: 0.4rem 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  color: var(--color-navy);
  outline: none;
  transition: width 0.25s ease, padding 0.25s ease;
}
.nav-search:hover input,
.nav-search:focus-within input { width: 9rem; padding: 0.4rem 0 0.4rem 0.85rem; }
.nav-search button { display: flex; padding: 0.45rem 0.6rem; border: none; background: none; color: var(--color-navy); cursor: pointer; }

/* Search page */
.search-panel {
  position: relative;
  margin: 0 0 2rem;
  padding: 1.75rem 2rem 1.5rem 2.25rem;
  border-radius: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
/* Same pastel stripe as the careers intro card. */
.search-panel::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: var(--gradient-pastel); }
.search-panel .section-label { margin-bottom: 0.75rem; }
.search-page-form { display: flex; gap: 0.6rem; }
.search-field {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.9rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--color-muted);
}
.search-field:focus-within { outline: 2px solid var(--color-navy-light); outline-offset: 1px; }
.search-field input { flex: 1; min-width: 0; padding: 0.8rem 0; border: none; outline: none; font: inherit; background: transparent; color: var(--color-navy); }
.search-page-form button { border: none; cursor: pointer; font-family: inherit; padding-left: 1.5rem; padding-right: 1.5rem; }
.search-hint { margin: 0.75rem 0 0; font-size: 0.8rem; color: var(--color-muted); }
.search-status { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 1rem; }
.search-status:empty { display: none; }
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  color: var(--color-muted);
  text-align: center;
}
.search-empty svg { color: var(--color-border-strong); }
.search-empty p { margin: 0; }
.search-results { display: grid; gap: 0.75rem; }
.search-result { display: block; padding: 1rem 1.2rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-alt); color: inherit; }
.search-result:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: 0 6px 18px rgba(22, 35, 60, 0.06); }
.search-result h2 { font-size: 1rem; margin: 0 0 0.35rem; }
.search-result p { margin: 0; font-size: 0.85rem; color: var(--color-muted); }
.search-result mark { background: #efe3ff; color: inherit; border-radius: 2px; }

/* Recruit page */
.recruit-intro {
  position: relative;
  margin: 0 0 3.5rem;
  padding: 2rem 2.25rem 2rem 2.5rem;
  border-radius: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
/* Brand pastel stripe down the left edge. */
.recruit-intro::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: var(--gradient-pastel); }
.recruit-intro .section-label { margin-bottom: 0.4rem; }
.recruit-lead { margin: 0 0 0.6rem; font-family: 'Klee One', 'LINE Seed JP', sans-serif; font-size: 1.6rem; line-height: 1.3; color: var(--color-navy); }
.recruit-intro p:last-child { margin: 0; color: var(--color-navy-soft); }
.job-list { display: grid; gap: 1rem; margin-bottom: 0.9rem; }
.job-lang-note { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 3.5rem; font-size: 0.8rem; color: #9a5b00; }
.job-lang-note svg { flex-shrink: 0; }
.job-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  color: var(--color-muted);
  text-align: center;
}
.job-empty svg { color: var(--color-border-strong); }
.job-empty p { margin: 0; }
.recruit-apply {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 20px rgba(22, 35, 60, 0.06);
}
.recruit-apply-col { display: flex; flex-direction: column; align-items: flex-start; padding: 1.75rem 2rem; }
.recruit-apply-col + .recruit-apply-col { border-left: 1px solid var(--color-border); }
.recruit-apply-tag { padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--gradient-pastel); font-size: 0.75rem; font-weight: 700; color: var(--color-navy); }
.recruit-apply-tag.is-outline { background: #fff; border: 1px solid var(--color-border-strong); }
.recruit-apply h3 { margin: 0.7rem 0 0.4rem; font-size: 1.1rem; }
.recruit-apply p { margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--color-navy-soft); }
.recruit-apply-col > a { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: auto; }
.recruit-apply .recruit-apply-note { margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--color-muted); }
.recruit-apply .recruit-apply-warn { display: flex; align-items: center; gap: 0.35rem; margin: 0.3rem 0 0; font-size: 0.75rem; color: #9a5b00; }
.recruit-apply-warn svg { flex-shrink: 0; }
.job-card {
  display: block;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-alt);
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.job-card:hover { text-decoration: none; box-shadow: 0 8px 20px rgba(22, 35, 60, 0.08); transform: translateY(-2px); }
.job-card.is-closed { opacity: 0.6; }
.job-card.is-closed:hover { box-shadow: none; transform: none; }
.job-card h3 { font-size: 1.15rem; margin: 0.6rem 0 0.8rem; }
.job-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.job-type,
.job-status { padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: var(--color-navy); }
.job-type { background: var(--gradient-pastel); }
.job-status { background: #fff; border: 1px solid var(--color-border-strong); }
.job-status.is-closed { color: var(--color-muted); background: var(--color-bg); }
.job-summary { display: flex; flex-direction: column; gap: 0.35rem; margin: 0 0 0.9rem; font-size: 0.85rem; }
.job-summary:last-child { margin-bottom: 0; } /* closed cards end here (no 詳細を見る), so padding alone sets the gap */
.job-summary div { display: flex; gap: 0.5rem; }
.job-summary dt { color: var(--color-muted); white-space: nowrap; }
.job-summary dd { margin: 0; }
.job-more { font-size: 0.85rem; font-weight: 700; }
.job-body { white-space: pre-wrap; line-height: 1.8; }

/* Job detail page */
.job-detail { margin-bottom: 1.25rem; }
.job-detail-title { font-size: 1.6rem; margin: 0.8rem 0 2rem; }
.job-detail-heading { font-size: 1rem; margin: 0 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--color-border); }
.job-detail .job-body { margin-bottom: 2.25rem; }
.job-table td { line-height: 1.8; }
.job-req { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.7rem 0.9rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-alt); }
.job-req + .job-req { margin-top: 0.6rem; }
/* Phones: tag above the text, so the text gets the box's full width. */
@media (max-width: 600px) { .job-req { flex-direction: column; gap: 0.4rem; } }
.job-req-tag { flex-shrink: 0; padding: 0.05rem 0.55rem; border-radius: 4px; background: #fff; border: 1px solid var(--color-border-strong); font-size: 0.75rem; font-weight: 700; line-height: 1.6; margin-top: 0.15rem; }
.job-empty-text { color: var(--color-muted); }

/* Admin job editor */
.field-grid-3 { grid-template-columns: repeat(3, 1fr); }
/* Full-width note under a row of fields (pulled up into the fields' bottom margin). */
.field-grid-note { grid-column: 1 / -1; margin: -2rem 0 1.3rem; }
.admin-form textarea.job-field-input { min-height: 72px; }
/* Contact form: required privacy policy consent, above the submit button */
.contact-form .form-consent { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1.2rem; font-weight: 400; cursor: pointer; }
.contact-form .form-consent input { width: 1.1rem; height: 1.1rem; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--color-navy); cursor: pointer; }
.contact-form .form-consent a { text-decoration: underline; }

/* Back to top: a triangular tab in the bottom-right corner (desktop only). Hidden
   off-corner until scrolled; also hidden while the cookie banner is up (they'd overlap). */
.back-to-top {
  display: none;
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 150;
  width: 76px;
  height: 76px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--gradient-pastel);
  /* Right triangle flush with the corner. */
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  color: #343434;
  cursor: pointer;
  transform: translate(100%, 100%);
  visibility: hidden;
  transition: transform 0.3s ease, filter 0.15s ease, visibility 0s linear 0.3s;
}
.back-to-top.is-visible { transform: none; visibility: visible; transition: transform 0.3s ease, filter 0.15s ease; }
.back-to-top:hover,
.back-to-top:focus-visible { background: var(--gradient-pastel); filter: brightness(0.94); outline: none; }
.back-to-top svg { position: absolute; left: 43px; top: 43px; transition: transform 0.2s ease; }
.back-to-top:hover svg { transform: translateY(-3px); }
@media (min-width: 901px) {
  .back-to-top { display: block; }
  .cookie-banner ~ .back-to-top { display: none; }
}

/* 404 */
/* Fills the screen, message centered in the space below the floating header. */
.not-found { text-align: center; min-height: 100svh; display: flex; align-items: center; padding-top: var(--header-space); padding-bottom: 0; }
.not-found .container { width: 100%; }
.not-found h1 { margin: 0 0 0.75rem; }
.not-found-desc { margin: 0 0 1.75rem; color: var(--color-navy-soft); }
.not-found .btn-solid-light { display: inline-block; background: #fff; }

/* Mobile overrides for the careers and search components. Kept at the end of the file
   because their base rules come after the main mobile block above. */
@media (max-width: 600px) {
  /* Narrower side padding so both hero buttons fit on one line (EN too). */
  .hero-actions a { flex: 1 1 auto; padding-left: 0.8rem; padding-right: 0.8rem; text-align: center; }
  .recruit-intro { padding: 1.5rem 1.25rem 1.5rem 1.6rem; }
  .recruit-lead { font-size: 1.3rem; }
  .recruit-apply { grid-template-columns: 1fr; }
  .recruit-apply-col { padding: 1.4rem 1.25rem; }
  .recruit-apply-col + .recruit-apply-col { border-left: none; border-top: 1px solid var(--color-border); }
  .search-panel { padding: 1.4rem 1.1rem 1.2rem 1.5rem; }
  .search-page-form button { padding-left: 1rem; padding-right: 1rem; }
}
