 :root {
      /* プレミアム&ナチュラルカラー設定 */
      --font-family-sans: "Noto Sans JP", sans-serif;
      --font-family-serif: "Noto Serif JP", serif;
      --main-color: #1e504f;                      /* 深い松葉色（ユーグレナグリーン） */
      --main-color-light: #2a716f;                /* 少し明るい松葉色 */
      --accent-color: #e6a43c;                    /* ゴールド系アクセント */
      --accent-color-light: #f2c069;              /* 明るいゴールド */
      --bg-color: #f5f7f6;                        /* 明るいアイボリー */
      --text-color: #333333;                      /* 濃い目のグレー */
      --light-text: #717171;                      /* ミディアムグレー */
      
      /* ボーダー・影設定 */
      --border: 1px solid rgba(0, 0, 0, 0.1);
      --border-radius: 12px;
      --box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
      
      /* メッセージ背景色 */
      --user-msg-bg: linear-gradient(135deg, #f2f2e3, #e6e8d9);  /* 淡い緑色がかったグラデーション */
      --bot-msg-bg: #ffffff;
      
      /* アニメーション速度 */
      --transition-speed: 0.3s;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: var(--font-family-sans);
      background-color: var(--bg-color);
      color: var(--text-color);
      line-height: 1.6;
    }

    .chat-widget {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 360px;
      max-width: 90%;
      border-radius: var(--border-radius);
      background-color: #fff;
      box-shadow: var(--box-shadow);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      font-size: 14px;
      transition: all var(--transition-speed) ease-in-out;
      z-index: 1000;
      border: 1px solid rgba(30, 80, 79, 0.15);   /* 微妙な枠線を追加 */
    }

    .chat-widget.minimized {
      height: 60px;
      overflow: hidden;
    }

    .chat-header {
      background: linear-gradient(135deg, var(--main-color), var(--main-color-light));
      color: #fff;
      padding: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      overflow: hidden;
    }
    
    /* 高級感を出すための模様の追加 */
    .chat-header::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.07' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
      pointer-events: none;
    }
    
    .chat-header .title {
      font-size: 16px;
      font-weight: 500;
      display: flex;
      align-items: center;
      position: relative;
      font-family: var(--font-family-serif);
      letter-spacing: 0.5px;
    }
    
    .chat-header .title .header-icon {
      margin-right: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      background-color: rgba(255, 255, 255, 0.2);
      border-radius: 50%;
    }
    
    .chat-header .controls {
      display: flex;
      gap: 10px;
      position: relative;
    }
    
    .chat-header .control-btn {
      background: transparent;
      border: none;
      color: #fff;
      cursor: pointer;
      font-size: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      padding: 0;
      transition: transform var(--transition-speed);
      position: relative;
    }
    
    .chat-header .control-btn:hover {
      transform: scale(1.2);
    }

    .chat-body {
      display: flex;
      flex-direction: column;
      height: 400px;
    }

    .chat-messages {
      flex: 1;
      padding: 16px;
      overflow-y: auto;
      background-color: var(--bg-color);
      scroll-behavior: smooth;
      background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e6e8d9' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M0 20L20 0v20H0zm20 0l20-20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
    }

    .message-container {
      display: flex;
      margin-bottom: 16px;
      align-items: flex-start;
    }
    
    .message-container.user-container {
      justify-content: flex-end;
      flex-direction: row-reverse;
    }
    
    .avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      margin: 0 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .user-avatar {
      background: linear-gradient(135deg, var(--accent-color), var(--accent-color-light));
      color: white;
    }
    
    .bot-avatar {
      background: linear-gradient(135deg, var(--main-color), var(--main-color-light));
      color: white;
    }

    .message {
      max-width: 70%;
      padding: 12px 16px;
      border-radius: 18px;
      line-height: 1.5;
      word-wrap: break-word;
      position: relative;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .user-message {
      background: var(--user-msg-bg);
      border-bottom-right-radius: 4px;
      font-family: var(--font-family-sans);
    }
    
    .bot-message {
      background-color: var(--bot-msg-bg);
      border: var(--border);
      border-bottom-left-radius: 4px;
      font-family: var(--font-family-sans);
    }
    
    .message-time {
      font-size: 11px;
      color: var(--light-text);
      margin-top: 4px;
      display: block;
      text-align: right;
    }

    /* タイピングインジケーター */
    .typing-indicator {
      display: flex;
      align-items: center;
      margin-left: 54px;
      margin-bottom: 16px;
      background-color: rgba(255, 255, 255, 0.8);
      border-radius: 18px;
      padding: 8px 16px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      width: max-content;
    }
    
    .typing-dot {
      width: 8px;
      height: 8px;
      margin: 0 2px;
      background-color: var(--main-color);
      border-radius: 50%;
      opacity: 0.6;
      animation: typingAnimation 1.4s infinite ease-in-out;
    }
    
    .typing-dot:nth-child(1) {
      animation-delay: 0s;
    }
    
    .typing-dot:nth-child(2) {
      animation-delay: 0.2s;
    }
    
    .typing-dot:nth-child(3) {
      animation-delay: 0.4s;
    }
    
    @keyframes typingAnimation {
      0%, 60%, 100% {
        transform: translateY(0);
      }
      30% {
        transform: translateY(-5px);
      }
    }

    /* 入力エリア */
    .chat-input-area {
      display: flex;
      padding: 14px;
      background-color: #fff;
      border-top: 1px solid rgba(30, 80, 79, 0.1);
      position: relative;
    }
    
    .chat-input-wrapper {
      flex: 1;
      position: relative;
      display: flex;
      align-items: center;
      background-color: var(--bg-color);
      border-radius: 24px;
      overflow: hidden;
      transition: box-shadow var(--transition-speed);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(30, 80, 79, 0.15);
    }
    
    .chat-input-wrapper:focus-within {
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      border-color: var(--main-color-light);
    }
    
    .chat-input {
      flex: 1;
      border: none;
      padding: 12px 16px;
      font-size: 14px;
      outline: none;
      background-color: transparent;
      font-family: var(--font-family-sans);
    }
    
    .chat-send-btn {
      width: 42px;
      height: 42px;
      background: linear-gradient(135deg, var(--accent-color), var(--accent-color-light));
      border: none;
      color: #fff;
      border-radius: 50%;
      margin-left: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform var(--transition-speed), box-shadow var(--transition-speed);
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    .chat-send-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    }
    
    .chat-send-btn:active {
      transform: scale(0.95);
    }

    /* チュートリアル */
    .tutorial {
      padding: 14px 16px;
      background-color: rgba(30, 80, 79, 0.05);
      border-bottom: 1px solid rgba(30, 80, 79, 0.1);
      position: relative;
    }
    
    .tutorial-content {
      font-size: 13px;
      color: var(--text-color);
      line-height: 1.5;
      font-family: var(--font-family-sans);
    }
    
    .tutorial-close {
      position: absolute;
      top: 8px;
      right: 8px;
      background: transparent;
      border: none;
      color: var(--light-text);
      cursor: pointer;
      font-size: 16px;
    }

    /* スクロールバー */
    .chat-messages::-webkit-scrollbar {
      width: 6px;
    }
    
    .chat-messages::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
    }
    
    .chat-messages::-webkit-scrollbar-thumb {
      background-color: rgba(30, 80, 79, 0.3);
      border-radius: 20px;
    }
    
    .chat-messages::-webkit-scrollbar-thumb:hover {
      background-color: rgba(30, 80, 79, 0.5);
    }

    /* アニメーション */
    @keyframes popIn {
      0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
      }
      100% {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }
    
    .pop-in {
      animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }
    
    /* レスポンシブ */
    @media (max-width: 480px) {
      .chat-widget {
        width: 90%;
        right: 5%;
        bottom: 10px;
      }
      
      .message {
        max-width: 80%;
      }
    }
    
    /* プレミアム要素: チャットアイコン */
    .chat-launcher {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--main-color), var(--main-color-light));
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      transition: transform 0.3s, box-shadow 0.3s;
      z-index: 999;
    }
    
    .chat-launcher:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }
    
    .chat-launcher i {
      font-size: 24px;
    }
    
    /* 波紋エフェクト */
    .chat-launcher::after {
      content: '';
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background-color: rgba(30, 80, 79, 0.4);
      z-index: -1;
      animation: ripple 1.5s infinite ease-out;
    }
    
    @keyframes ripple {
      0% {
        transform: scale(1);
        opacity: 0.7;
      }
      100% {
        transform: scale(1.5);
        opacity: 0;
      }
    }
    
    /* リンクスタイル */
    .bot-message a {
      color: var(--main-color);
      text-decoration: none;
      border-bottom: 1px dotted var(--main-color);
      transition: color 0.2s, border-bottom 0.2s;
      font-weight: 500;
    }
    
    .bot-message a:hover {
      color: var(--accent-color);
      border-bottom: 1px solid var(--accent-color);
    }
    
    /* 強調表示 */
    .bot-message strong {
      color: var(--main-color);
      font-weight: 600;
    }