@import url("./akari-chat.css");

:root {
  --ink: #3a2417;
  --muted: #7c6655;
  --orange: #f27b18;
  --orange-dark: #cc5f00;
  --orange-soft: #fff0df;
  --cream: #fffaf2;
  --paper: #fff6e9;
  --surface: #ffffff;
  --line: #f0cfac;
  --green: #4b8b38;
  --blue: #3879b7;
  --red: #d94b3d;
  --shadow: 0 14px 34px rgba(119, 72, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
article[id] {
  scroll-margin-top: 150px;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 194, 101, 0.26), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, var(--paper) 48%, #fffaf3 100%);
  font-family: "Yu Gothic", "Meiryo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a,
button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-main,
.nav-bar,
main {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
}

.header-main {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: linear-gradient(135deg, #ff9b28, #ef6d00);
  clip-path: polygon(50% 0%, 62% 34%, 98% 35%, 69% 56%, 79% 92%, 50% 70%, 21% 92%, 31% 56%, 2% 35%, 38% 34%);
  font-size: 1.8rem;
  line-height: 1;
}

.brand strong {
  display: block;
  font-size: clamp(1.34rem, 2.4vw, 2.05rem);
  line-height: 1.12;
  font-weight: 900;
}

.brand strong span {
  color: var(--orange);
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.search-shell {
  position: relative;
  flex: 0 1 420px;
}

#siteSearch {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 52px 0 22px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(242, 123, 24, 0.03);
}

#siteSearch:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 123, 24, 0.12);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: translateY(-58%);
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  right: -8px;
  bottom: -5px;
  border-radius: 999px;
  background: var(--ink);
  transform: rotate(45deg);
}

.nav-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.nav-bar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.nav-bar a:last-child {
  border-right: 0;
}

.nav-pill {
  border-right: 0 !important;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8b18, #f06c00);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(242, 123, 24, 0.22);
}

main {
  padding-bottom: 42px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) 300px;
  gap: 28px;
  min-height: 360px;
  margin-top: 18px;
  padding: clamp(28px, 4.2vw, 54px);
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 66% 30%, rgba(255, 176, 73, 0.24), transparent 22%),
    radial-gradient(circle at 84% 76%, rgba(255, 226, 186, 0.72), transparent 22%),
    linear-gradient(135deg, #fffef9 0%, #fff2df 100%);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "★";
  position: absolute;
  color: rgba(242, 123, 24, 0.25);
  font-size: 6.4rem;
  line-height: 1;
  transform: rotate(12deg);
}

.hero::before {
  top: 18px;
  right: 35%;
}

.hero::after {
  right: 22px;
  bottom: 16px;
  font-size: 4.8rem;
  transform: rotate(-18deg);
}

.hero-copy,
.akari-visual,
.navigator-card {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.akari-visual {
  align-self: end;
  justify-self: center;
  width: min(340px, 100%);
  height: 430px;
  margin: 0;
  pointer-events: none;
}

.akari-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 28px rgba(119, 72, 24, 0.22));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 920px;
  font-size: clamp(2.25rem, 4.6vw, 4.35rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

h1 span {
  color: var(--orange);
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 900;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff8d17, #ef6700);
  box-shadow: 0 16px 26px rgba(239, 103, 0, 0.22);
}

.button-light {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-tags span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--orange-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.navigator-card {
  align-self: center;
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(119, 72, 24, 0.08);
}

.navigator-badge {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--orange);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 900;
  transform: rotate(-8deg);
}

.navigator-card h2 {
  margin: 18px 0 12px;
  color: var(--orange-dark);
  font-size: 1.18rem;
}

.navigator-card p {
  color: var(--muted);
  font-weight: 800;
}

.today-note {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--orange-soft);
}

.today-note span,
.today-note strong {
  display: block;
}

.today-note span {
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
}

.today-note strong {
  margin-top: 6px;
  font-size: 0.95rem;
}

.game-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.game-card {
  position: relative;
  min-height: 94px;
  padding: 18px 52px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 226, 0.88)),
    repeating-linear-gradient(45deg, rgba(242, 123, 24, 0.05) 0 8px, transparent 8px 16px);
  box-shadow: 0 8px 20px rgba(119, 72, 24, 0.08);
}

.game-card-main {
  border-color: #f0a55b;
  background: linear-gradient(135deg, #fff3df, #ffe0bd);
}

.game-card span,
.game-card strong {
  display: block;
}

.game-card span {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 900;
}

.game-card strong {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
}

.game-card a {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.8rem;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 8px 18px rgba(119, 72, 24, 0.12);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 0.85fr 0.85fr;
  gap: 12px;
  margin-top: 14px;
}

.panel,
.route-panel,
.feature-section,
.tips-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(119, 72, 24, 0.08);
}

.panel {
  min-height: 206px;
  padding: 18px;
}

.route-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 18px;
}

.route-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-grid a,
.route-grid button {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #f3d5b7;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff8ef, #fff);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font-weight: 900;
}

.route-grid a::after,
.route-grid button::after {
  content: "›";
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.route-grid strong,
.route-grid span {
  display: block;
}

.route-grid strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 1.08rem;
}

.route-grid span {
  grid-column: 1;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.85rem;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-title span,
.panel-more {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.panel-more {
  text-decoration: none;
}

.panel-more:hover,
.panel-more:focus-visible {
  color: var(--orange-dark);
  outline: none;
}

.news-list,
.rank-list,
.quick-links,
.tool-links {
  display: grid;
  gap: 8px;
}

.news-item,
.rank-list button,
.rank-list a,
.quick-links button,
.quick-links a,
.tool-links button,
.tool-links a,
.tip-grid button,
.tip-grid a {
  border: 0;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.news-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 3px 6px;
  text-decoration: none;
}

.news-item b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  font-size: 0.68rem;
}

.news-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-item time {
  color: var(--muted);
  font-size: 0.76rem;
}

.rank-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: rank;
}

.rank-list li {
  counter-increment: rank;
  min-height: 30px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}

.rank-list li::before {
  content: counter(rank);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.rank-list button,
.rank-list a {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  text-decoration: none;
}

.quick-links button,
.quick-links a,
.tool-links button,
.tool-links a,
.tip-grid button,
.tip-grid a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: linear-gradient(90deg, #fff8ed, #fff);
  border: 1px solid #f4dbc0;
  text-decoration: none;
}

.feature-section,
.tips-section {
  margin-top: 16px;
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.status-grid a,
.db-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.status-grid a {
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
}

.count {
  display: block;
  color: var(--orange-dark);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 900;
}

.status-grid strong {
  display: block;
  margin-top: 10px;
}

.status-grid p,
.db-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.db-grid {
  display: grid;
  gap: 12px;
}

.db-group {
  display: grid;
  gap: 10px;
}

.db-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.db-group-title h3 {
  margin: 0;
  font-size: 1.08rem;
}

.db-group-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.db-subgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.db-card {
  min-height: 144px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.db-card:hover,
.db-card:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 12px 24px rgba(242, 123, 24, 0.16);
  outline: none;
}

.db-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.db-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 900;
}

.db-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.db-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.32;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff3e4;
  color: var(--orange-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.db-open {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tip-grid button,
.tip-grid a {
  min-height: 64px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px max(28px, calc((100% - 1360px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .akari-visual {
    grid-column: 2;
    grid-row: 1;
    height: 360px;
  }

  .navigator-card {
    grid-column: 1 / -1;
  }

  .game-tabs,
  .db-subgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-panel {
    grid-template-columns: 1fr;
  }

  .status-grid,
  .route-grid,
  .tip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .header-main,
  .nav-bar,
  main {
    width: calc(100% - 28px);
  }

  .header-main {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0;
    gap: 14px;
  }

  .search-shell {
    flex-basis: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .akari-visual {
    grid-column: auto;
    grid-row: auto;
    height: 320px;
  }

  .navigator-card {
    grid-column: auto;
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  .brand-star {
    width: 44px;
    height: 44px;
    font-size: 1.36rem;
  }

  .brand strong {
    font-size: 1.18rem;
  }

  .brand small {
    font-size: 0.76rem;
  }

  .nav-bar {
    gap: 6px;
    padding-bottom: 8px;
  }

  .nav-bar a {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  .hero {
    margin-top: 12px;
    padding: 24px 20px;
  }

  .hero::before {
    right: 6px;
    top: 6px;
    font-size: 4.2rem;
  }

  .hero::after {
    display: none;
  }

  h1 {
    font-size: 1.96rem;
    word-break: break-all;
  }

  h1 span {
    display: block;
  }

  .lead {
    font-size: 0.96rem;
    word-break: break-all;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 52px;
  }

  .game-tabs,
  .dashboard-grid,
  .status-grid,
  .route-grid,
  .db-subgrid,
  .tip-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* M1_POLICY_FOOTER */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-links a {
  color: var(--orange-dark);
  text-decoration: none;
  font-weight: 900;
}

.footer-links a:hover {
  text-decoration: underline;
}
