/*--------------------------------------------------------------
  Setting フローティングボタン（左下）
----------------------------------------------------------------*/
.gpv2-setting-toggle {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #4a90e2;
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3006;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.gpv2-setting-toggle:hover {
  background: #357abd;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}
.gpv2-setting-toggle:active {
  transform: scale(0.95);
}
.gpv2-setting-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
@media (max-width: 480px) {
  .gpv2-setting-toggle {
    left: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

/*--------------------------------------------------------------
  Setting モーダル（スライドイン）
----------------------------------------------------------------*/
#gpv2-setting-frame {
  position: fixed;
  top: 0;
  left: -100vw;
  width: 100vw;
  height: 100vh;
  background-color: rgba(13, 13, 14, 0.55);
  backdrop-filter: blur(4px);
  z-index: 3009;
  transition: left 0.4s ease-out;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}
#gpv2-setting-frame.active {
  left: 0;
}
#gpv2-setting-frame .setting-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: #ffffff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#gpv2-setting-frame .setting-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  padding: 18px 24px;
  font-size: 1.15rem;
  font-weight: 600;
  flex-shrink: 0;
}
#gpv2-setting-frame .setting-navbar .setting-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
#gpv2-setting-frame .setting-navbar svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}
#gpv2-setting-frame .setting-navbar #gpv2-setting-close {
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s ease;
}
#gpv2-setting-frame .setting-navbar #gpv2-setting-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
#gpv2-setting-frame .setting-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
#gpv2-setting-frame .setting-item {
  margin-bottom: 28px;
}
#gpv2-setting-frame .setting-item h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e3f2fd;
}
#gpv2-setting-frame .setting-item .pref-divisions select {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #2c3e50;
  cursor: pointer;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a90e2' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
#gpv2-setting-frame .setting-item .pref-divisions select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px #e3f2fd;
}
#gpv2-setting-frame .toggle-group {
  display: flex;
  gap: 8px;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}
#gpv2-setting-frame .toggle-group input[type=radio] {
  display: none;
}
#gpv2-setting-frame .toggle-group label {
  flex: 1;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s ease;
}
#gpv2-setting-frame .toggle-group label:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}
#gpv2-setting-frame .toggle-group input[type=radio]:checked + label {
  background: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}
#gpv2-setting-frame .setting-footer {
  padding: 16px 24px;
  border-top: 1px solid #e3f2fd;
  background: #fafbfc;
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}
#gpv2-setting-frame .setting-footer button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: none;
}
#gpv2-setting-frame .setting-footer .btn-cancel {
  background: #e9ecef;
  color: #495057;
}
#gpv2-setting-frame .setting-footer .btn-cancel:hover {
  background: #dde2e6;
}
#gpv2-setting-frame .setting-footer .btn-save {
  background: #4a90e2;
  color: #fff;
}
#gpv2-setting-frame .setting-footer .btn-save:hover {
  background: #357abd;
}
@media (max-width: 480px) {
  #gpv2-setting-frame .setting-container {
    max-width: 100%;
  }
}
