/* ==========================================================================
       Cocoon / WordPress 追加CSSに貼るスタイル全文
       ========================================================================== */
    #rs-app-wrapper {
      max-width: 680px;
      margin: 0 auto;
      padding: 16px 12px 60px 12px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      color: #333333;
      background-color: #fcfbfa;
      box-sizing: border-box;
    }

    #rs-app-wrapper * {
      box-sizing: border-box;
    }

    /* 上部固定ヘッダー・進捗バー */
    .rs-sticky-header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(252, 251, 250, 0.95);
      backdrop-filter: blur(8px);
      padding: 10px 0 14px 0;
      border-bottom: 1px solid #f0e6d8;
      margin-bottom: 20px;
    }

    .rs-header-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .rs-time-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #f4e8d2;
      color: #7a5c1e;
      font-size: 12px;
      font-weight: bold;
      padding: 4px 10px;
      border-radius: 20px;
    }

    /* 言語切替ボタン（スワイプ対応） */
    .rs-lang-scroll {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      padding-bottom: 4px;
      margin-bottom: 10px;
      scrollbar-width: none;
    }
    .rs-lang-scroll::-webkit-scrollbar {
      display: none;
    }

    .rs-lang-btn {
      flex: 0 0 auto;
      background: #ffffff;
      border: 1px solid #e2d7c5;
      color: #666;
      padding: 6px 12px;
      border-radius: 16px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .rs-lang-btn.active {
      background: #c59b27;
      color: #ffffff;
      border-color: #c59b27;
      font-weight: bold;
      box-shadow: 0 2px 6px rgba(197, 155, 39, 0.3);
    }

    /* プログレスバー */
    .rs-progress-bar-bg {
      height: 6px;
      background-color: #eae1d3;
      border-radius: 3px;
      overflow: hidden;
    }
    .rs-progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #d4af37 0%, #aa7c11 100%);
      width: 0%;
      transition: width 0.3s ease;
    }

    /* ステップカード */
    .rs-card {
      background: #ffffff;
      border-radius: 16px;
      padding: 20px 16px;
      margin-bottom: 20px;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
      border: 1px solid #f2e9dc;
      scroll-margin-top: 80px;
    }

    .rs-card-title {
      font-size: 16px;
      font-weight: bold;
      color: #4a3b22;
      margin: 0 0 14px 0;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .rs-sub-desc {
      font-size: 12px;
      color: #8c7a6b;
      margin-top: -8px;
      margin-bottom: 12px;
    }

    /* ボタン＆グリッド */
    .rs-grid-col-1 { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .rs-grid-col-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

    .rs-option-btn {
      background: #fdfbf7;
      border: 1px solid #e8dec8;
      border-radius: 12px;
      padding: 12px;
      text-align: left;
      font-size: 14px;
      color: #444;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      -webkit-tap-highlight-color: transparent;
    }

    .rs-option-btn.selected {
      background: #fbf5e6;
      border-color: #c59b27;
      color: #7a5c1e;
      font-weight: bold;
      box-shadow: 0 0 0 1px #c59b27;
    }

    .rs-rating-btn {
      flex-direction: column;
      align-items: flex-start;
      padding: 12px 14px;
    }
    .rs-rating-num {
      font-weight: bold;
      color: #d4af37;
      font-size: 15px;
    }

    .rs-input-text {
      width: 100%;
      padding: 12px;
      border: 1px solid #e0d5c1;
      border-radius: 10px;
      font-size: 14px;
      background: #fff;
      outline: none;
    }
    .rs-input-text:focus {
      border-color: #c59b27;
      box-shadow: 0 0 0 2px rgba(197, 155, 39, 0.15);
    }

    .rs-chip-group {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }
    .rs-chip {
      background: #f4ede2;
      color: #665235;
      font-size: 12px;
      padding: 6px 12px;
      border-radius: 20px;
      cursor: pointer;
      border: 1px solid #e6d8c3;
    }

    .rs-primary-btn {
      width: 100%;
      background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
      color: #ffffff;
      border: none;
      border-radius: 14px;
      padding: 16px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(170, 124, 17, 0.3);
      transition: all 0.2s ease;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
    }

    .rs-copy-btn-special {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #e5be49 0%, #b8860b 100%);
      animation: pulseGlow 2s infinite;
    }
    @keyframes pulseGlow {
      0% { transform: scale(1); box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4); }
      50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(229, 190, 73, 0.6); }
      100% { transform: scale(1); box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4); }
    }
    .rs-copy-btn-special::after {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
      transform: rotate(30deg);
      animation: shine 3s infinite;
    }
    @keyframes shine {
      0% { transform: translateX(-100%) rotate(30deg); }
      20% { transform: translateX(100%) rotate(30deg); }
      100% { transform: translateX(100%) rotate(30deg); }
    }

    .rs-google-btn {
      background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
      color: #ffffff;
      margin-top: 12px;
      animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    @keyframes popIn {
      0% { transform: scale(0.8); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .rs-memo-box {
      width: 100%;
      min-height: 110px;
      padding: 14px;
      border: 2px solid #e8dec8;
      border-radius: 12px;
      background: #faf8f5;
      font-size: 14px;
      line-height: 1.6;
      color: #333;
      resize: vertical;
      outline: none;
    }

    .rs-notice-box {
      background: #fdfaf3;
      border-left: 4px solid #c59b27;
      padding: 14px 16px;
      border-radius: 0 12px 12px 0;
      font-size: 13px;
      line-height: 1.6;
      color: #55442b;
      margin-bottom: 20px;
    }

    .rs-paste-guide-box {
      background: #fff8e6;
      border: 1px solid #f5d082;
      color: #7a5c1e;
      padding: 12px 14px;
      border-radius: 10px;
      font-size: 13px;
      line-height: 1.5;
      margin: 12px 0;
      text-align: center;
      font-weight: bold;
      animation: popIn 0.3s ease;
    }

    .rs-tone-group {
      display: flex;
      gap: 6px;
      margin-bottom: 10px;
    }
    .rs-tone-btn {
      flex: 1;
      padding: 8px;
      font-size: 12px;
      border: 1px solid #e0d5c1;
      background: #fff;
      border-radius: 8px;
      cursor: pointer;
      text-align: center;
      color: #666;
    }
    .rs-tone-btn.active {
      background: #7a5c1e;
      color: #fff;
      border-color: #7a5c1e;
      font-weight: bold;
    }

    .hidden { display: none !important; }

/* Production fixes */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body.admin-bar .rs-sticky-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .rs-sticky-header { top: 46px; }
}
@media screen and (max-width: 430px) {
  .rs-grid-col-2 { grid-template-columns: 1fr; }
  #rs-app-wrapper { padding-left: 8px; padding-right: 8px; }
}

.rs-primary-btn:disabled,
.rs-option-btn:disabled,
.rs-tone-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  animation: none !important;
}

.rs-error-box {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e6a4a4;
  border-radius: 10px;
  background: #fff4f4;
  color: #8a2727;
  font-size: 13px;
  line-height: 1.55;
}

.rs-warning-box {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e7ca85;
  border-radius: 10px;
  background: #fffaf0;
  color: #72551d;
  font-size: 12px;
  line-height: 1.55;
}

.rs-turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  min-height: 2px;
}

.rs-edit-hint,
.rs-privacy-note {
  color: #8c7a6b;
  font-size: 11px;
  line-height: 1.55;
}

.rs-edit-hint { margin: 7px 2px 10px; }
.rs-privacy-note { margin: 12px 2px 0; text-align: center; }

#rs-final-memo:not([readonly]) {
  background: #ffffff;
  border-color: #d9c79f;
}

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

.rs-intro-box {
  margin: 0 0 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffaf0 0%, #f8eed8 100%);
  border: 1px solid #e4cf9b;
  border-radius: 14px;
  color: #57431f;
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
  box-shadow: 0 3px 12px rgba(122, 92, 30, 0.07);
}

@media screen and (max-width: 480px) {
  .rs-intro-box {
    padding: 14px;
    font-size: 13px;
    line-height: 1.7;
  }
}

/* Version 2.0.2: visible but clearly secondary private-feedback choice */
.rs-google-login-note {
  margin: 12px 0 10px;
  padding: 11px 13px;
  border: 1px solid #d9e5f8;
  border-radius: 10px;
  background: #f5f9ff;
  color: #3d5475;
  font-size: 12px;
  line-height: 1.6;
}

.rs-direct-feedback-compact {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eadfce;
  text-align: left;
}

.rs-secondary-choice-label {
  margin: 0 0 8px;
  color: #766650;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.rs-direct-feedback-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #d9cdbd;
  border-radius: 12px;
  background: #fbf9f6;
  color: #514635;
  box-shadow: 0 2px 8px rgba(92, 72, 43, 0.06);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rs-direct-feedback-toggle:hover,
.rs-direct-feedback-toggle:focus-visible {
  border-color: #b8a68d;
  background: #f7f2eb;
  box-shadow: 0 3px 11px rgba(92, 72, 43, 0.09);
}

.rs-direct-feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eee5d8;
  font-size: 18px;
}

.rs-direct-feedback-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  text-align: left;
}

.rs-direct-feedback-toggle-title {
  color: #493e2f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.rs-direct-feedback-toggle-note {
  margin-top: 2px;
  color: #82735f;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.rs-direct-feedback-chevron {
  display: inline-block;
  flex: 0 0 auto;
  color: #8b7b67;
  font-size: 18px;
  transition: transform 0.2s ease;
}

.rs-direct-feedback-toggle[aria-expanded="true"] .rs-direct-feedback-chevron {
  transform: rotate(180deg);
}

.rs-direct-feedback-box {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid #e3d8c8;
  border-radius: 11px;
  background: #fcfaf7;
  text-align: left;
}

.rs-direct-feedback-description {
  margin: 0 0 12px;
  color: #6d604f;
  font-size: 13px;
  line-height: 1.65;
}

.rs-form-label {
  display: block;
  margin: 12px 0 6px;
  color: #5f513d;
  font-size: 13px;
  font-weight: 700;
}

.rs-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
  color: #574b3b;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}

.rs-consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.rs-consent-help {
  margin: 6px 0 11px 26px;
  color: #887967;
  font-size: 11px;
  line-height: 1.55;
}

.rs-direct-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #a99578;
  border-radius: 9px;
  background: #ffffff;
  color: #554735;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: none;
  cursor: pointer;
}

.rs-direct-send-btn:hover,
.rs-direct-send-btn:focus-visible {
  border-color: #806c50;
  background: #f7f2eb;
}

.rs-direct-send-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.rs-feedback-status {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
}

.rs-feedback-status.success {
  border: 1px solid #9fcaa9;
  background: #f1fbf3;
  color: #286438;
}

.rs-feedback-status.error {
  border: 1px solid #e2aaaa;
  background: #fff4f4;
  color: #8a2727;
}

.rs-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media screen and (max-width: 480px) {
  .rs-secondary-choice-label {
    font-size: 12px;
  }

  .rs-direct-feedback-toggle {
    padding: 12px;
    gap: 10px;
  }

  .rs-direct-feedback-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .rs-direct-feedback-toggle-title {
    font-size: 14px;
  }

  .rs-direct-feedback-toggle-note {
    font-size: 12px;
  }

  .rs-direct-feedback-box {
    padding: 13px;
  }
}

