/* ============================================================
   Omna 共通: リセット・背景・メニュー・オーバーレイ
   読み込み順: theme.css → common.css → (pages.css) → page固有
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* テキスト選択・長押しメニュー（コピー等）を抑止（フォーム入力は下で例外） */
html {
  -webkit-text-size-adjust: 100%;
}
html,
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* ---------- 背景グラデーション ---------- */
body {
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(180deg,
    #6bb3d6 0%,
    #98cce4 25%,
    #e8f6ff 50%,
    #98cce4 75%,
    #6bb3d6 100%);
  background-size: 100% 400%;
  animation: bg-drift-day 28s ease-in-out infinite;
}
body.night-mode {
  background: linear-gradient(180deg,
    #050810 0%,
    #0c1120 25%,
    #1a2340 50%,
    #0c1120 75%,
    #050810 100%);
  background-size: 100% 400%;
  animation: bg-drift-night 32s ease-in-out infinite;
}

@keyframes bg-drift-day {
  0%, 100% { background-position: 0% 0%; }
  50%       { background-position: 0% 33%; }
}
@keyframes bg-drift-night {
  0%, 100% { background-position: 0% 0%; }
  50%       { background-position: 0% 35%; }
}

/* 一時対応: トップの形状スタックを非表示 */
.gift-polygon-stack { display: none !important; }

/* ---------- 左上メニュー ---------- */
.menu-wrap {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  padding: 1.25rem 0 0 1.25rem;
}
.menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #1a3a52;
  -webkit-tap-highlight-color: transparent;
}
.menu-wrap.is-open .menu-trigger { color: #e4e2de; }
body.night-mode .menu-trigger      { color: #e8e6e3; }

.menu-icon {
  position: relative;
  width: 22px;
  height: 14px;
  display: block;
}
.menu-icon-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-icon-line:nth-child(1) { top: 0; }
.menu-icon-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-icon-line:nth-child(3) { bottom: 0; }
.menu-wrap.is-open .menu-icon-line:nth-child(1) {
  top: 50%; transform: translateY(-50%); opacity: 0;
}
.menu-wrap.is-open .menu-icon-line:nth-child(2) { transform: translateY(-50%); }
.menu-wrap.is-open .menu-icon-line:nth-child(3) {
  bottom: auto; top: 50%; transform: translateY(-50%); opacity: 0;
}

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0.5rem 0 0 20px;
  padding: 0.5rem 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.menu-wrap.is-open .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-panel[hidden] { display: block !important; }
.menu-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.menu-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #e4e2de;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
body.night-mode .menu-item       { color: #c8c4be; }
body.night-mode .menu-item:hover {
  background: rgba(232, 230, 227, 0.12);
  color: #e8e6e3;
}

/* ---------- メニュー開時：背面オーバーレイ ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.menu-wrap.is-open + .menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
