    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      padding: 16px;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: #f5f5f7;
      color: #222;
    }

    .app {
      max-width: 900px;
      margin: 0 auto;
    }

    h1 {
      font-size: 1.4rem;
      margin-bottom: 0.5rem;
    }

    .panel {
      background: #fff;
      border-radius: 8px;
      padding: 16px;
      margin-top: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .controls {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-bottom: 12px;
    }

    label {
      font-size: 0.9rem;
    }

    select, button {
      padding: 6px 10px;
      font-size: 0.9rem;
    }

    /* ==========================
       ボタンの共通ルール
    ========================== */
    button {
      all: unset;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      padding: 0 12px;
      font-size: 0.9rem;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      font-weight: 500;
      user-select: none;
    }

    /* ホバー時 */
    button:hover {
      opacity: 0.9;
    }

    /* 押したとき */
    button:active {
      transform: translateY(1px);
    }

    /* 無効状態 */
    button:disabled {
      opacity: 0.5;
      cursor: default;
      transform: none;
    }

    /* ==========================
       ボタン種別（色違い）
    ========================== */

    /* メインボタン（開始など） */
    .btn-primary {
      background: #007aff;
      color: #fff;
      border: 1px solid #007aff;
    }

    /* サブボタン（終了・コピー・共有など） */
    .btn-secondary {
      background: #ffffff;
      color: #007aff;
      border: 1px solid #007aff;
    }

    /* ニュートラル（画像化など） */
    .btn-neutral {
      background: #f2f2f2;
      color: #333;
      border: 1px solid #ccc;
    }

    /* 黒ボタン（現在のXボタン風にする場合） */
    .btn-black {
      background: #000;
      color: #fff;
      border: 1px solid #000;
    }

    .timer {
      font-size: 1.3rem;
      font-weight: bold;
      margin-left: auto;
      min-width: 90px;
      text-align: right;
    }

    .char-count {
      font-size: 0.9rem;
      color: #444;
      min-width: 90px;
      text-align: right;
      margin-left: 8px;
    }

    textarea {
      width: 100%;
      min-height: 320px;
      resize: vertical;
      padding: 10px;
      font-size: 0.95rem;
      line-height: 1.6;
      font-family: "游明朝", "YuMincho", "Hiragino Mincho ProN", serif;
    }

    .status {
      font-size: 0.85rem;
      color: #666;
      margin-top: 4px;
      min-height: 1.2em;
    }

    /* 結果表示＋フキダシ */
    #resultWrapper {
      padding: 16px 14px;
      margin: 20px 0;
      font-size: 0.9rem;
      text-align: center;
      display: none;
    }

    .bubble {
      display: inline-block;
      padding: 8px 16px;
      background: #ffffff;
      border-radius: 9px;
      border: 1px solid #ddd;
      position: relative;
      margin-bottom: 6px;
    }

    .bubble::after {
      content: "";
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: -8px;
      border-width: 8px 8px 0 8px;
      border-style: solid;
      border-color: #ffffff transparent transparent transparent;
      filter: drop-shadow(0 1px 0 #ddd);
    }

    .result-wrapper {
      margin: 20px 0;
      text-align: center;
    }

    .result-bubble {
      display: inline-block;
      padding: 12px 16px;
      border-radius: 9px;
      border: 1px solid #e2e2e2;
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    }

    .result-main {
      margin: 0 0 4px;
      font-size: 0.95rem;
      font-weight: 600;
    }

    .result-sub {
      margin: 0 0 8px;
      font-size: 0.75rem;
      color: #777777;
    }

    .result-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
    }

    /* 汎用のサブボタン例（既にあれば不要） */
    .secondary-button {
      border: 1px solid #d0d0d0;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 0.8rem;
      background: #f7f7f7;
      cursor: pointer;
    }

    .secondary-button:disabled {
      opacity: 0.6;
      cursor: default;
    }


    /* PRボックス */
    .pr-box {
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 16px 14px;
      margin: 20px 0;
      font-size: 0.9rem;
      text-align: center;
      background: #fafafa;
    }

    .pr-title {
      font-weight: bold;
      margin-bottom: 12px;
    }

    .pr-images {
      display: flex;
      justify-content: center;
      gap: 20px;
      flex-wrap: wrap;
    }

    .pr-images a {
      display: block;
    }

    .pr-images img {
      width: 160px;
      border-radius: 8px;
    }

    .pr-note {
      font-size: 0.8rem;
      color: #666;
      margin-top: 12px;
      line-height: 1.6;
    }

    footer {
      margin-top: 40px;
      padding: 20px 0;
      text-align: center;
      font-size: 0.85rem;
      color: #666;
    }

    footer a {
      color: #007aff;
      text-decoration: none;
    }

    footer a:hover {
      text-decoration: underline;
    }