/**
 * Chocotto Land Official Web Design System (chocotto-official.css)
 * Extracted & Engineered from https://chocottoland.hange.jp/
 * Features: Light/Dark mode, Responsive Grid, Official Typography & Warm Brown/Orange Palette
 */

400;500;700;800;900&family=Josefin+Sans:wght@600;700&display=swap');

:root {
  /* ========================================================
     Color Palette (Official Light Theme)
     ======================================================== */
  --bg-main: #fff4ee;
  --bg-container: #ffffff;
  --bg-card: #ffffff;
  --bg-panel-sub: #fffaf7;
  --bg-highlight: #fff2cf;
  --bg-modal: rgba(59, 39, 28, 0.6);

  /* Brand Browns */
  --choco-brown-main: #704932;
  --choco-brown-deep: #4a3225;
  --choco-brown-mid: #a86f4d;
  --choco-brown-light: #c29275;
  --choco-border: #d0c4bd;
  --choco-border-light: #e8e2de;
  --choco-border-dark: #704932;

  /* Accent Orange & Alert */
  --choco-orange: #f3871d;
  --choco-orange-hover: #e0740b;
  --choco-orange-soft: #ffc083;
  --choco-orange-glow: rgba(243, 135, 29, 0.25);
  --choco-alert-red: #db6767;
  --choco-alert-bg: rgba(219, 103, 103, 0.1);
  --choco-success-green: #2e7d32;
  --choco-success-bg: rgba(46, 125, 50, 0.1);

  /* Typography Colors */
  --text-main: #444444;
  --text-heading: #704932;
  --text-sub: #888888;
  --text-dim: #aaaaaa;
  --text-white: #ffffff;

  /* Header & Footer */
  --header-bg: #ffffff;
  --footer-bg: #3b271c;
  --footer-text: #d0c4bd;

  /* ========================================================
     Typography System
     ======================================================== */
  --font-primary: 'M PLUS Rounded 1c', 'M PLUS 1p', 'YakuHanJP', Meiryo, 'Hiragino Kaku Gothic Pro', sans-serif;
  --font-accent: 'Josefin Sans', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-hero: 2.25rem;       /* 36px */
  --fs-h1: 1.875rem;        /* 30px */
  --fs-h2: 1.5rem;          /* 24px */
  --fs-h3: 1.25rem;         /* 20px */
  --fs-h4: 1.125rem;        /* 18px */
  --fs-lead: 1.0rem;        /* 16px */
  --fs-body: 0.9375rem;     /* 15px */
  --fs-small: 0.875rem;     /* 14px */
  --fs-caption: 0.75rem;    /* 12px */
  --fs-micro: 0.65rem;      /* 10.4px */

  --lh-heading: 1.35;
  --lh-body: 1.6;

  /* ========================================================
     Layout & Elevation
     ======================================================== */
  --max-w-wide: 1160px;
  --max-w-standard: 950px;
  --max-w-narrow: 768px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 30px;

  --shadow-soft: 0 4px 16px rgba(112, 73, 50, 0.08);
  --shadow-card: 0 6px 20px rgba(112, 73, 50, 0.06);
  --shadow-hover: 0 10px 28px rgba(112, 73, 50, 0.12);
  --shadow-header: 0 2px 10px rgba(112, 73, 50, 0.08);

  --transition-default: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-main: #101010;
  --bg-container: #181818;
  --bg-card: #202020;
  --bg-panel-sub: #272727;
  --bg-highlight: #3b2a1a;
  --bg-modal: rgba(0, 0, 0, 0.8);

  --choco-brown-main: #ffc083;
  --choco-brown-deep: #e09e63;
  --choco-brown-mid: #c29275;
  --choco-brown-light: #ffc083;
  --choco-border: #444444;
  --choco-border-light: #333333;
  --choco-border-dark: #ffc083;

  --text-main: #dddddd;
  --text-heading: #ffffff;
  --text-sub: #999999;
  --text-dim: #777777;

  --header-bg: #272727;
  --footer-bg: #141414;
  --footer-text: #888888;

  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.6);
  --shadow-header: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ========================================================
   Base & Reset
   ======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: var(--lh-body);
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  color: var(--text-main);
}

a {
  color: var(--choco-orange);
  text-decoration: none;
  transition: var(--transition-default);
}
a:hover {
  color: var(--choco-orange-hover);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ========================================================
   Typography Elements
   ======================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  font-weight: 700;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  margin-bottom: 0.75rem;
}

.text-lead {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--text-main);
}

.text-sub {
  font-size: var(--fs-caption);
  color: var(--text-sub);
}

.accent-font {
  font-family: var(--font-accent);
}

/* ========================================================
   Layout Containers
   ======================================================== */
.container-wide {
  width: 100%;
  max-width: var(--max-w-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-standard {
  width: 100%;
  max-width: var(--max-w-standard);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-narrow {
  width: 100%;
  max-width: var(--max-w-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ========================================================
   Official Header & Navigation
   ======================================================== */
.chocotto-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  border-bottom: 2px solid var(--choco-border);
  box-shadow: var(--shadow-header);
}

.chocotto-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.chocotto-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--choco-brown-main);
}

.chocotto-logo-badge {
  background-color: var(--choco-orange);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.chocotto-nav-list {
  display: flex;
  list-style: none;
  gap: 20px;
}

.chocotto-nav-item a {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--choco-brown-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.chocotto-nav-item a:hover,
.chocotto-nav-item.active a {
  background-color: var(--bg-main);
  color: var(--choco-orange);
}

/* Pill Tabs (Official Category / Job Tabs) */
.chocotto-tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.5rem 0;
  justify-content: center;
}

.chocotto-pill-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--choco-brown-main);
  background-color: var(--bg-card);
  border: 2px solid var(--choco-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-default);
  user-select: none;
}

.chocotto-pill-tab:hover {
  border-color: var(--choco-orange);
  color: var(--choco-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.chocotto-pill-tab.active {
  background-color: var(--choco-orange);
  border-color: var(--choco-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--choco-orange-glow);
}

/* ========================================================
   Hero Section
   ======================================================== */
.chocotto-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--choco-border);
}

.chocotto-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--choco-orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background-color: var(--bg-card);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--choco-border);
}

.chocotto-hero-title {
  font-size: var(--fs-hero);
  font-weight: 900;
  color: var(--choco-brown-main);
  margin-bottom: 0.75rem;
}

.chocotto-hero-desc {
  font-size: var(--fs-lead);
  color: var(--text-main);
  max-width: 680px;
  margin: 0 auto;
}

/* ========================================================
   Card & Box System
   ======================================================== */
.chocotto-card {
  background-color: var(--bg-card);
  border: 1px solid var(--choco-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-default);
  margin-bottom: 1.5rem;
}

.chocotto-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--choco-brown-light);
}

.chocotto-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--bg-main);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.chocotto-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-h3);
  color: var(--choco-brown-main);
  font-weight: 700;
}

.chocotto-card-sub {
  background-color: var(--bg-panel-sub);
  border: 1px solid var(--choco-border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

/* Special Focus / Highlight Box */
.chocotto-box-highlight {
  background: linear-gradient(135deg, var(--bg-highlight) 0%, #fffaf0 100%);
  border: 2px solid var(--choco-orange-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.chocotto-box-alert {
  background-color: var(--choco-alert-bg);
  border-left: 4px solid var(--choco-alert-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

/* ========================================================
   Data Tables (Spec & Official Style)
   ======================================================== */
.chocotto-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--choco-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  background-color: var(--bg-card);
}

.chocotto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
  text-align: left;
}

.chocotto-table th {
  background-color: var(--choco-brown-main);
  color: #ffffff;
  font-weight: 700;
  font-size: var(--fs-small);
  padding: 12px 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.chocotto-table th:last-child {
  border-right: none;
}

.chocotto-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--choco-border-light);
  border-right: 1px solid var(--choco-border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.chocotto-table td:last-child {
  border-right: none;
}

.chocotto-table tr:last-child td {
  border-bottom: none;
}

.chocotto-table tr:nth-child(even) td {
  background-color: var(--bg-panel-sub);
}

.chocotto-table tr:hover td {
  background-color: var(--bg-highlight);
}

/* Status numerical display in table */
.chocotto-table .stat-val {
  font-weight: 700;
  color: var(--choco-brown-deep);
  font-family: var(--font-mono);
}

.chocotto-table .stat-highlight {
  font-weight: 800;
  color: var(--choco-orange);
  font-family: var(--font-mono);
}

/* ========================================================
   Badges, Pills & Labels
   ======================================================== */
.chocotto-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: var(--fs-caption);
  font-weight: 700;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.chocotto-badge-brown {
  background-color: var(--choco-brown-main);
  color: #ffffff;
}

.chocotto-badge-orange {
  background-color: var(--choco-orange);
  color: #ffffff;
}

.chocotto-badge-outline {
  background-color: transparent;
  border: 1px solid var(--choco-border);
  color: var(--choco-brown-main);
}

.chocotto-badge-alert {
  background-color: var(--choco-alert-red);
  color: #ffffff;
}

/* ========================================================
   Buttons
   ======================================================== */
.chocotto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: var(--fs-small);
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-default);
  text-decoration: none;
}

.chocotto-btn-primary {
  background-color: var(--choco-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--choco-orange-glow);
}

.chocotto-btn-primary:hover {
  background-color: var(--choco-orange-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--choco-orange-glow);
}

.chocotto-btn-secondary {
  background-color: var(--choco-brown-main);
  color: #ffffff;
}

.chocotto-btn-secondary:hover {
  background-color: var(--choco-brown-deep);
  color: #ffffff;
  transform: translateY(-2px);
}

.chocotto-btn-outline {
  background-color: transparent;
  border-color: var(--choco-border);
  color: var(--choco-brown-main);
}

.chocotto-btn-outline:hover {
  border-color: var(--choco-orange);
  color: var(--choco-orange);
  background-color: var(--bg-card);
}

/* ========================================================
   Interactive Details / Accordion
   ======================================================== */
.chocotto-accordion {
  border: 1px solid var(--choco-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: var(--transition-default);
}

.chocotto-accordion summary {
  padding: 14px 18px;
  font-weight: 700;
  font-size: var(--fs-small);
  color: var(--choco-brown-main);
  cursor: pointer;
  background-color: var(--bg-card);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.chocotto-accordion summary::-webkit-details-marker {
  display: none;
}

.chocotto-accordion summary::after {
  content: "＋";
  font-size: 1.1rem;
  color: var(--choco-orange);
  transition: var(--transition-default);
}

.chocotto-accordion[open] summary::after {
  content: "－";
}

.chocotto-accordion[open] summary {
  border-bottom: 1px solid var(--choco-border-light);
  background-color: var(--bg-panel-sub);
}

.chocotto-accordion-body {
  padding: 16px 18px;
  font-size: var(--fs-body);
  color: var(--text-main);
  background-color: var(--bg-card);
}

/* ========================================================
   Official Footer
   ======================================================== */
.chocotto-footer {
  margin-top: auto;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0 2rem;
  border-top: 3px solid var(--choco-orange);
}

.chocotto-footer a {
  color: var(--choco-orange-soft);
}

.chocotto-footer a:hover {
  color: #ffffff;
}

.chocotto-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.chocotto-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  font-size: var(--fs-small);
}

.chocotto-footer-copy {
  font-size: var(--fs-caption);
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================================
   Responsive Media Queries
   ======================================================== */
@media (max-width: 768px) {
  :root {
    --fs-hero: 1.75rem;
    --fs-h1: 1.5rem;
    --fs-h2: 1.25rem;
    --fs-h3: 1.125rem;
  }

  .chocotto-header-inner {
    height: 60px;
  }

  .chocotto-nav-list {
    display: none; /* Mobile menu toggled */
  }

  .chocotto-pill-tab {
    padding: 8px 16px;
    font-size: var(--fs-caption);
  }

  .chocotto-card {
    padding: 1.25rem;
  }

  .chocotto-table th,
  .chocotto-table td {
    padding: 10px 10px;
    font-size: var(--fs-small);
  }
}



/* ========================================================
   Unified Site Navigation Bar (.site-nav)
   ======================================================== */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  background: #ffffff;
  border: 1px solid var(--choco-border, #d0c4bd);
  border-radius: 30px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(112, 73, 50, 0.08);
  position: relative;
  z-index: 50;
  width: 100%;
}

.site-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--choco-brown-main, #704932);
  font-family: var(--font-title, 'M PLUS Rounded 1c', sans-serif);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.site-nav .nav-badge-official {
  background-color: var(--choco-orange, #f3871d);
  color: #ffffff;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  font-family: var(--font-accent, 'Josefin Sans', sans-serif);
  letter-spacing: 0.05em;
}

.site-nav .nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav .nav-links a {
  color: var(--choco-brown-main, #704932);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.site-nav .nav-links a:hover {
  color: var(--choco-orange, #f3871d);
  background: #fff4ee;
  border-color: var(--choco-border, #d0c4bd);
}

.site-nav .nav-links a.active {
  color: #ffffff !important;
  background: var(--choco-orange, #f3871d) !important;
  border-color: var(--choco-orange, #f3871d) !important;
  box-shadow: 0 4px 12px rgba(243, 135, 29, 0.25);
}

@media (max-width: 900px) {
  .site-nav {
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 20px;
  }
  .site-nav .nav-links {
    justify-content: center;
    width: 100%;
  }
  .site-nav .nav-links a {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
}
