/* =========================
   GL Notes site common
   共通部品 + Lightning調整 + responsive
========================= */

:root {
  --primary: #162A44;
  --accent: #C6A75E;
  --bg: #F7F7F7;
  --text: #4A4A4A;
  --line: #E5E5E5;
  --card: #FFFFFF;
  --muted: #7A7A7A;

  --page-max-mobile: 100%;
  --page-max-tablet: 820px;
  --page-max-desktop: 1200px;

  --page-pad-mobile: 16px;
  --page-pad-tablet: 24px;
  --page-pad-desktop: 32px;

  --section-gap-mobile: 16px;
  --section-gap-desktop: 24px;

  --bottom-nav-height: 74px;
}

/* =========================
   minimum base
========================= */

html {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* GL Notesラッパーの基本 */
.gl-top-app,
.gl-notes-app {
  color: var(--text);
}

/* リンク */
.gl-top-app a,
.gl-notes-app a {
  color: inherit;
  text-decoration: none;
}

/* 画像 */
.gl-top-app img,
.gl-notes-app img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* box-sizingだけは安全なので入れる */
.gl-top-app,
.gl-top-app *,
.gl-top-app *::before,
.gl-top-app *::after,
.gl-notes-app,
.gl-notes-app *,
.gl-notes-app *::before,
.gl-notes-app *::after {
  box-sizing: border-box;
}

/* =========================
   Lightningの不要装飾を
   GL Notesエリア内だけ弱める
========================= */

.entry-body .gl-top-app h1,
.entry-body .gl-top-app h2,
.entry-body .gl-top-app h3,
.entry-body .gl-top-app h4,
.entry-body .gl-top-app h5,
.entry-body .gl-top-app h6,
.entry-body .gl-notes-app h1,
.entry-body .gl-notes-app h2,
.entry-body .gl-notes-app h3,
.entry-body .gl-notes-app h4,
.entry-body .gl-notes-app h5,
.entry-body .gl-notes-app h6 {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
}

.entry-body > .gl-top-app:first-child,
.entry-body > .gl-notes-app:first-child {
  margin-top: 0;
}

.entry-body > .gl-top-app:last-child,
.entry-body > .gl-notes-app:last-child {
  margin-bottom: 0;
}

/* フォーム要素の最小調整 */
.gl-top-app input[type="text"],
.gl-top-app input[type="search"],
.gl-top-app input[type="email"],
.gl-top-app input[type="number"],
.gl-top-app input[type="url"],
.gl-top-app input[type="password"],
.gl-top-app select,
.gl-top-app textarea,
.gl-notes-app input[type="text"],
.gl-notes-app input[type="search"],
.gl-notes-app input[type="email"],
.gl-notes-app input[type="number"],
.gl-notes-app input[type="url"],
.gl-notes-app input[type="password"],
.gl-notes-app select,
.gl-notes-app textarea {
  font: inherit;
  color: var(--text);
}

.gl-top-app button,
.gl-notes-app button {
  font: inherit;
}

/* =========================
   page shell utility
========================= */

.gl-page-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  color: var(--text);
}

.gl-page-section {
  padding-left: var(--page-pad-mobile);
  padding-right: var(--page-pad-mobile);
}

.gl-page-stack {
  display: grid;
  gap: var(--section-gap-mobile);
}

.gl-card {
  background: var(--card);
  border: 1px solid rgba(22, 42, 68, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(22, 42, 68, 0.05);
}

/* PCで使いやすいレイアウト補助 */
.gl-layout-2col,
.gl-layout-3col {
  display: grid;
  gap: var(--section-gap-mobile);
}

.gl-main-column,
.gl-side-column {
  min-width: 0;
}

/* =========================
   common parts
========================= */

/* section title */
.gl-section-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* tabs */
.gl-tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.gl-tab {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid rgba(198, 167, 94, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.gl-tab.is-active {
  color: var(--primary);
  font-weight: 800;
  border-color: rgba(198, 167, 94, 0.5);
  background: linear-gradient(180deg, #FBF8F0 0%, #F3E7C8 100%);
  box-shadow: inset 0 0 0 1px rgba(198, 167, 94, 0.16);
}

/* generic button */
.gl-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(198, 167, 94, 0.36);
  background: linear-gradient(180deg, #D6BC7D 0%, #C6A75E 100%);
  color: var(--primary);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(198, 167, 94, 0.22);
}

/* chips */
.gl-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.gl-chip {
  background: #EFE6D0;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #7A6022;
  border-radius: 999px;
}

/* rating */
.gl-stars {
  color: var(--accent);
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}

.gl-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #444;
  flex-wrap: wrap;
}

.gl-meta-mini {
  font-size: 11px;
  color: #666;
}

/* pill */
.gl-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gl-pill {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(22, 42, 68, .08);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.gl-pill-label {
  font-size: 12px;
  line-height: 1.2;
  color: var(--primary);
  width: 100%;
}

/* =========================
   bottom nav
   mobile only
========================= */

.gl-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--bottom-nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 50;
}

.gl-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  color: #7A7A7A;
  text-decoration: none;
}

.gl-bottom-nav a.is-active {
  color: var(--primary);
}

.gl-nav-ico {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gl-nav-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}

.gl-nav-ico svg rect,
.gl-nav-ico svg path,
.gl-nav-ico svg circle,
.gl-nav-ico svg line,
.gl-nav-ico svg polyline,
.gl-nav-ico svg polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gl-nav-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}

/* 下部ナビがあるページ用 */
.gl-has-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

/* =========================
   responsive
========================= */

/* tablet */
@media (min-width: 768px) {
  .gl-page-shell {
    max-width: var(--page-max-tablet);
    padding-bottom: 40px;
  }

  .gl-page-section {
    padding-left: var(--page-pad-tablet);
    padding-right: var(--page-pad-tablet);
  }

  .gl-page-stack {
    gap: 20px;
  }

  .gl-section-title {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .gl-tabs {
    gap: 14px;
    margin-bottom: 16px;
  }

  .gl-tab {
    min-width: 108px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .gl-more-btn {
    width: auto;
    min-width: 220px;
    margin-top: 18px;
    padding: 13px 20px;
  }

  .gl-pill-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .gl-layout-2col {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 20px;
  }

  .gl-layout-3col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .gl-bottom-nav {
    display: none;
  }

  .gl-has-bottom-nav {
    padding-bottom: 0;
  }
}

/* desktop */
@media (min-width: 1024px) {
  .gl-page-shell {
    max-width: var(--page-max-desktop);
    padding-bottom: 56px;
  }

  .gl-page-section {
    padding-left: var(--page-pad-desktop);
    padding-right: var(--page-pad-desktop);
  }

  .gl-page-stack {
    gap: var(--section-gap-desktop);
  }

  .gl-section-title {
    font-size: 28px;
    margin-bottom: 18px;
  }

  .gl-tabs {
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 18px;
  }

  .gl-tab {
    min-width: 120px;
    padding: 11px 18px;
    font-size: 15px;
  }

  .gl-more-btn {
    min-width: 240px;
    padding: 14px 24px;
    font-size: 16px;
  }

  .gl-chip {
    font-size: 13px;
  }

  .gl-stars,
  .gl-rating-row {
    font-size: 13px;
  }

  .gl-meta-mini {
    font-size: 12px;
  }

  .gl-pill-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }

  .gl-pill {
    min-height: 56px;
    font-size: 13px;
    padding: 10px 12px;
  }

  .gl-pill-label {
    font-size: 13px;
  }

  .gl-layout-2col {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
  }

  .gl-layout-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}