/* DICE Official Cocoon Child v4 */

:root {
  --dice-navy: #06264d;
  --dice-navy-2: #021a38;
  --dice-blue: #0b4d8d;
  --dice-accent: #0a4c92;
  --dice-ink: #071f3d;
  --dice-muted: #566579;
  --dice-line: #dce5ef;
  --dice-bg: #f5f8fb;
  --dice-white: #ffffff;
  --dice-shadow: 0 20px 70px rgba(6, 38, 77, .14);
  --dice-header-h: 78px;
}

* { box-sizing: border-box; }
html { margin: 0 !important; scroll-behavior: smooth; }

body.dice-official {
  margin: 0;
  min-width: 320px;
  color: var(--dice-ink);
  background: #fff;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.78;
}

body.dice-dark {
  --dice-navy: #dbeafe;
  --dice-navy-2: #020617;
  --dice-blue: #60a5fa;
  --dice-accent: #93c5fd;
  --dice-ink: #e5edf8;
  --dice-muted: #b7c3d4;
  --dice-line: rgba(255,255,255,.14);
  --dice-bg: #071527;
  background: #020617;
  color: var(--dice-ink);
}

body.admin-bar .dice-header { top: 32px; }

.dice-skip {
  position: fixed; left: 16px; top: -80px; z-index: 999999;
  padding: .75rem 1rem; background: #06264d; color: #fff;
  text-decoration: none; font-weight: 700;
}
.dice-skip:focus { top: 16px; }

.dice-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.dice-center { text-align: center; margin-top: 38px; }

.dice-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(6,38,77,.08);
  backdrop-filter: blur(16px);
  transition: box-shadow .2s ease, background .2s ease;
}
body.dice-dark .dice-header { background: rgba(2,6,23,.86); border-bottom-color: rgba(255,255,255,.12); }
.dice-header.is-scrolled { box-shadow: 0 12px 40px rgba(6,38,77,.12); }

.dice-header-inner {
  width: min(1280px, calc(100% - 48px)); min-height: var(--dice-header-h); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}

.dice-brand, .dice-footer-brand { display: inline-flex; align-items: center; gap: 13px; color: var(--dice-navy); text-decoration: none; }
.dice-brand img { width: 52px; height: 52px; object-fit: contain; }
.dice-brand strong, .dice-footer-brand strong { display: block; color: var(--dice-navy); font-size: 1.75rem; line-height: 1; letter-spacing: .13em; }
.dice-brand small, .dice-footer-brand small { display: block; margin-top: 4px; color: var(--dice-navy); font-size: .82rem; letter-spacing: .05em; }

.dice-nav { display: flex; align-items: center; gap: 22px; }
.dice-nav a { color: var(--dice-ink); text-decoration: none; font-weight: 800; font-size: .94rem; white-space: nowrap; }
.dice-nav a:hover { color: var(--dice-accent); }
.dice-nav .dice-nav-cta { padding: .8rem 1.15rem; background: #06264d; color: #fff; }
.dice-dark-toggle { width: 40px; height: 40px; border: 1px solid var(--dice-line); background: transparent; color: var(--dice-ink); cursor: pointer; font-weight: 900; }

.dice-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 1px solid var(--dice-line);
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.dice-menu-toggle span { display: block; width: 20px; height: 2px; background: var(--dice-ink); transition: transform .2s ease, opacity .2s ease; }
.dice-header.is-nav-open .dice-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dice-header.is-nav-open .dice-menu-toggle span:nth-child(2) { opacity: 0; }
.dice-header.is-nav-open .dice-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dice-hero {
  min-height: 680px; display: flex; align-items: center; padding: 128px 0 70px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.84) 34%, rgba(255,255,255,.18) 64%, rgba(255,255,255,0) 100%),
    var(--hero-image) center calc(50% + var(--parallax-y, 0px)) / cover no-repeat;
}
body.dice-dark .dice-hero { background: linear-gradient(90deg, rgba(2,6,23,.92), rgba(2,6,23,.62), rgba(2,6,23,.16)), var(--hero-image) center calc(50% + var(--parallax-y, 0px)) / cover no-repeat; }

.dice-hero-grid { display: grid; grid-template-columns: minmax(0, .78fr) minmax(280px, 1fr); gap: 40px; }
.dice-hero-copy { max-width: 680px; }

.dice-overline, .dice-label {
  display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1rem;
  color: var(--dice-accent); font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
}
.dice-overline::before, .dice-label::before { content:""; width:32px; height:2px; background: var(--dice-accent); }

.dice-hero h1 {
  margin: 0; color: var(--dice-navy); font-size: clamp(2.65rem, 5.6vw, 5.15rem);
  line-height: 1.22; letter-spacing: .03em; font-weight: 800;
}
.dice-lead { max-width: 620px; margin: 1.4rem 0 0; color: var(--dice-ink); font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 2; }

.dice-actions { display: flex; flex-wrap: wrap; gap: .95rem; margin-top: 2rem; }
.dice-button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: .86rem 1.35rem; text-decoration: none; font-weight: 900; border: 1px solid transparent; }
.dice-button-primary { background: #06264d; color: #fff; }
.dice-button-outline { background: rgba(255,255,255,.92); border-color: #06264d; color: #06264d; }

.dice-section { padding: clamp(70px, 8vw, 108px) 0; }
.dice-soft { background: var(--dice-bg); }

.dice-about-grid, .dice-agora-grid, .dice-contact-grid, .dice-page-grid {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(38px, 6vw, 82px); align-items: center;
}
.dice-about h2, .dice-agora h2, .dice-contact h2, .dice-page-content h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.34; letter-spacing: .04em; }
.dice-about p, .dice-agora p, .dice-contact p, .dice-page-content p { color: var(--dice-muted); font-size: 1.02rem; }
.dice-about figure, .dice-page-image { margin: 0; }
.dice-about img, .dice-page-image img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; box-shadow: var(--dice-shadow); }

.dice-text-link { display: inline-flex; gap: 1rem; align-items: center; margin-top: 1.1rem; padding: .75rem 1.2rem; border: 1px solid var(--dice-navy); color: var(--dice-navy); text-decoration: none; font-weight: 900; }

.dice-projects { background: var(--dice-white); }
body.dice-dark .dice-projects, body.dice-dark .dice-service-grid article { background: #061426; }
.dice-section-heading { text-align: center; margin-bottom: 42px; }
.dice-section-heading h2 { margin: 0; color: var(--dice-navy); font-size: clamp(1.85rem, 3vw, 2.6rem); letter-spacing: .08em; }

.dice-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.dice-service-grid article { background: #fff; box-shadow: 0 12px 42px rgba(6,38,77,.09); border: 1px solid #e9eef5; overflow: hidden; }
.dice-service-grid img { display: block; width: 100%; aspect-ratio: 16/8.8; object-fit: cover; }
.dice-card-body { padding: 0 28px 28px; margin-top: -28px; position: relative; z-index: 1; }
.dice-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 1rem; color: #fff; background: #06264d; border-radius: 999px; font-weight: 900; }
.dice-service-grid h3 { margin: 0 0 .6rem; color: var(--dice-navy); font-size: 1.3rem; }
.dice-service-grid p { margin: 0; color: var(--dice-muted); }

.dice-stats { padding: 32px 0; background: var(--dice-bg); border-top: 1px solid var(--dice-line); border-bottom: 1px solid var(--dice-line); }
.dice-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; }
.dice-stats-grid div { text-align: center; padding: 16px 20px; border-right: 1px solid var(--dice-line); }
.dice-stats-grid div:last-child { border-right: 0; }
.dice-stats-grid strong { display: block; color: var(--dice-navy); font-size: 2rem; line-height: 1; }
.dice-stats-grid span { display: block; margin-top: .4rem; color: var(--dice-muted); font-size: .9rem; }

.dice-activity { background: #fff; }
body.dice-dark .dice-activity { background: #020617; }
.dice-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.dice-activity-grid figure { margin: 0; position: relative; overflow: hidden; background: #000; }
.dice-activity-grid img { display: block; width: 100%; aspect-ratio: 16/9.5; object-fit: cover; transition: transform .3s ease; }
.dice-activity-grid figure:hover img { transform: scale(1.04); }
.dice-activity-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; color: #fff; font-weight: 900; background: linear-gradient(180deg, transparent, rgba(0,0,0,.72)); }

.dice-agora { color: #fff; background: linear-gradient(135deg, #021a38, #06264d); }
.dice-agora .dice-label, .dice-agora h2 { color: #fff; }
.dice-agora p { color: rgba(255,255,255,.77); }
.dice-small { font-size: .94rem !important; opacity: .85; }
.dice-agora-cards { display: grid; gap: 14px; }
.dice-agora-cards div, .dice-agora-cards a { display: block; padding: 26px 30px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); text-decoration: none; }
.dice-agora-cards strong { display: block; color: #fff; font-size: 1.2rem; letter-spacing: .08em; }
.dice-agora-cards span { display: block; margin-top: .5rem; color: rgba(255,255,255,.74); }

.dice-news-strip { padding: 26px 0; background: var(--dice-bg); border-top: 1px solid var(--dice-line); border-bottom: 1px solid var(--dice-line); }
.dice-news-strip .dice-shell { display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: center; }
.dice-news-title { color: var(--dice-navy); font-weight: 900; font-size: 1.2rem; }
.dice-news-list { display: flex; flex-wrap: wrap; gap: 20px; color: var(--dice-muted); }
.dice-news-list strong, .dice-news-list a { color: var(--dice-ink); text-decoration: none; }
.dice-news-strip > .dice-shell > a { color: var(--dice-navy); text-decoration: none; font-weight: 900; }

.dice-contact { background: linear-gradient(90deg, rgba(5,21,45,.94), rgba(5,21,45,.77)), var(--contact-image) center/cover no-repeat; color: #fff; }
.dice-contact .dice-label, .dice-contact h2 { color: #fff; }
.dice-contact p { color: rgba(255,255,255,.78); }
.dice-contact-panel { padding: clamp(26px, 3vw, 40px); background: rgba(255,255,255,.96); color: #071f3d; }
.dice-contact-panel h3 { margin-top: 0; color: #06264d; font-size: 1.6rem; }

.dice-contact-form { display: grid; gap: 16px; }
.dice-contact-form label span { display: block; margin-bottom: .35rem; color: #06264d; font-weight: 800; }
.dice-contact-form input, .dice-contact-form textarea, .dice-contact-form select { width: 100%; padding: .85rem .9rem; border: 1px solid #cbd5e1; background: #fff; color: #071f3d; font: inherit; }
.dice-contact-form button { min-height: 50px; padding: .85rem 1.2rem; border: 0; background: #06264d; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.dice-hp { position: absolute !important; left: -9999px !important; }
.dice-form-status { padding: .8rem 1rem; margin: 0 0 1rem; font-weight: 700; }
.dice-form-status.is-success { background: #ecfdf5; color: #047857; }
.dice-form-status.is-error { background: #fef2f2; color: #b91c1c; }

.dice-footer { color: #fff; background: #06264d; }
.dice-footer-grid { display: grid; grid-template-columns: 1.28fr repeat(3, .8fr) 1.2fr; gap: clamp(28px, 4vw, 54px); padding: 58px 0; }
.dice-footer-brand img { width: 48px; height: 48px; }
.dice-footer-brand strong, .dice-footer-brand small { color: #fff; }
.dice-footer-brand-block p, .dice-footer-contact p { max-width: 320px; color: rgba(255,255,255,.75); }
.dice-footer h3 { margin: 0 0 1rem; color: #fff; font-size: 1rem; }
.dice-footer nav { display: grid; align-content: start; gap: .45rem; }
.dice-footer nav a, .dice-footer-contact a { color: rgba(255,255,255,.78); text-decoration: none; }
.dice-footer nav a:hover, .dice-footer-contact a:hover { color: #fff; }
.dice-footer-contact { border: 1px solid rgba(255,255,255,.22); padding: 24px; }
.dice-footer-bottom { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.7); }
.dice-footer-bottom .dice-shell { display: flex; justify-content: space-between; gap: 18px; }

.dice-page-hero { padding: 150px 0 80px; background: var(--dice-bg); }
.dice-page-hero h1 { margin: 0; color: var(--dice-navy); font-size: clamp(2.4rem, 5vw, 4.2rem); }
.dice-page-hero p { max-width: 760px; color: var(--dice-muted); }
.dice-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.dice-feature-card { padding: 30px; background: #fff; border: 1px solid var(--dice-line); box-shadow: 0 10px 34px rgba(6,38,77,.07); }
a.dice-feature-card { display: block; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.dice-feature-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(6,38,77,.14); }
body.dice-dark .dice-feature-card { background: #061426; }
.dice-feature-card h3 { margin-top: 0; color: var(--dice-navy); }
.dice-feature-card p { color: var(--dice-muted); }

.dice-archive { padding: 140px 0 80px; }
.dice-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.dice-post-card { padding: 24px; border: 1px solid var(--dice-line); background: #fff; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .dice-hero { background-position: 58% center; }
  .dice-hero-grid { grid-template-columns: 1fr; }
  .dice-about-grid, .dice-agora-grid, .dice-contact-grid, .dice-page-grid { grid-template-columns: 1fr; }
  .dice-service-grid, .dice-activity-grid, .dice-feature-grid, .dice-post-grid { grid-template-columns: 1fr; }
  .dice-footer-grid { grid-template-columns: 1fr 1fr; }
  .dice-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body.admin-bar .dice-header { top: 46px; }
  .dice-menu-toggle { display: flex; }
  .dice-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--dice-white);
    border-bottom: 1px solid var(--dice-line);
    box-shadow: 0 16px 32px rgba(6,38,77,.14);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  body.dice-dark .dice-nav { background: var(--dice-navy-2); }
  .dice-header.is-nav-open .dice-nav { max-height: calc(100vh - var(--dice-header-h)); overflow-y: auto; }
  .dice-nav a { width: 100%; padding: 16px 24px; border-bottom: 1px solid var(--dice-line); white-space: normal; }
  .dice-nav .dice-nav-cta { text-align: center; }
  .dice-dark-toggle { margin: 14px 24px; }
  .dice-hero { min-height: 620px; padding-top: 150px; }
  .dice-news-strip .dice-shell { grid-template-columns: 1fr; gap: 10px; }
  .dice-footer-grid { grid-template-columns: 1fr; }
  .dice-footer-bottom .dice-shell { flex-direction: column; }
}

@media (max-width: 520px) {
  .dice-shell { width: min(100% - 24px, 1180px); }
  .dice-brand strong { font-size: 1.35rem; }
  .dice-hero h1 { font-size: clamp(2.25rem, 12vw, 3.45rem); }
  .dice-actions { display: grid; }
  .dice-button { width: 100%; }
  .dice-stats-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* v4.2 additions: service links, single posts, floating actions */
.dice-service-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.dice-service-link:hover h3,
.dice-service-link:focus h3 {
  color: var(--dice-accent);
}
.dice-more {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--dice-accent);
  font-weight: 900;
}

.dice-floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  display: grid;
  gap: 10px;
}
.dice-floating-actions a,
.dice-floating-actions button {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: #06264d;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  cursor: pointer;
}
.dice-page-top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.dice-page-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dice-single-main,
.dice-page-main,
.dice-archive-main {
  padding-top: var(--dice-header-h);
}

.dice-single,
.dice-page {
  padding: clamp(72px, 8vw, 110px) 0;
}

.dice-single-header,
.dice-page-header {
  max-width: 860px;
  margin-bottom: 34px;
}

.dice-single-header h1,
.dice-page-header h1 {
  margin: 0;
  color: var(--dice-navy);
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.24;
  letter-spacing: .03em;
}

.dice-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1rem;
  color: var(--dice-muted);
  font-size: .92rem;
}
.dice-single-meta a {
  color: var(--dice-muted);
}

.dice-single-eyecatch {
  margin: 0 0 36px;
}
.dice-single-eyecatch img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
  box-shadow: var(--dice-shadow);
}

.dice-single-content,
.dice-page-content-wide {
  max-width: 860px;
  font-size: 1.05rem;
}
.dice-single-content h2,
.dice-page-content-wide h2 {
  margin-top: 2.4em;
  color: var(--dice-navy);
}
.dice-single-content a,
.dice-page-content-wide a {
  color: var(--dice-accent);
  font-weight: 800;
}

.dice-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--dice-line);
}
.dice-post-nav a {
  color: var(--dice-navy);
  text-decoration: none;
  font-weight: 900;
}

.dice-post-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.dice-post-card figure {
  margin: 0 0 1rem;
}
.dice-post-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.dice-post-card time {
  color: var(--dice-muted);
  font-size: .9rem;
}
.dice-post-card h2 {
  margin: .3rem 0 .6rem;
  color: var(--dice-navy);
  font-size: 1.25rem;
}

.dice-footer-bottom a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
}

@media (max-width: 760px) {
  .dice-floating-actions {
    right: 12px;
    bottom: 12px;
  }
  .dice-floating-actions a,
  .dice-floating-actions button {
    width: 48px;
    height: 48px;
  }
}

/* v4.2.1: news archive list */
.dice-news-archive { display: flex; flex-direction: column; margin-top: 10px; }
.dice-news-archive-item { display: flex; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--dice-line); }
.dice-news-archive-item time { flex: 0 0 100px; color: var(--dice-muted); font-weight: 700; font-size: .9rem; }
.dice-news-archive-item h3 { margin: 0 0 8px; font-size: 1.08rem; }
.dice-news-archive-item h3 a { color: var(--dice-ink); text-decoration: none; }
.dice-news-archive-item h3 a:hover { color: var(--dice-accent); }
.dice-news-archive-item p { margin: 0; color: var(--dice-muted); font-size: .92rem; line-height: 1.7; }
.dice-pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 34px; font-weight: 800; }
.dice-pagination a { color: var(--dice-navy); text-decoration: none; }
.dice-pagination span { color: var(--dice-muted); font-size: .88rem; }
.dice-empty-state { color: var(--dice-muted); padding: 30px 0; text-align: center; }

@media (max-width: 640px) {
  .dice-news-archive-item { flex-direction: column; gap: 6px; }
  .dice-news-archive-item time { flex-basis: auto; }
}

/* v4.3.2: 個別ページ内の情報テーブル */
.dice-info-table { width: 100%; border-collapse: collapse; margin: 18px 0 28px; }
.dice-info-table th, .dice-info-table td { padding: 12px 16px; border-bottom: 1px solid var(--dice-line); text-align: left; vertical-align: top; }
.dice-info-table th { width: 30%; color: var(--dice-navy); font-weight: 800; background: var(--dice-bg); }
.dice-page-content h3 { margin-top: 1.8em; color: var(--dice-navy); }
.dice-page-content ul { padding-left: 1.3em; }
.dice-page-content li { margin-bottom: .5em; }
@media (max-width: 640px) {
  .dice-info-table th, .dice-info-table td { display: block; width: auto; }
  .dice-info-table th { border-bottom: none; padding-bottom: 4px; }
}
