@charset "UTF-8";

    * { box-sizing: border-box; }

    body {
      background: #f5f7fa;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      margin: 0;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
    }

    .top-section {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: 14px;
    }

    .soica-img {
      width: 100%;
      height: auto;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      max-width: 320px;
      margin: 0 auto;
    }

    .balance-container,
    .container,
    .info-box,
    .blog-box {
      background: white;
      width: 100%;
      border-radius: 8px;
      padding: 12px 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      text-align: center;
      max-width: 320px;
      margin: 0 auto;
    }

    .balance-text {
      font-size: 1.2rem;
      font-weight: 700;
      color: #0078D7;
    }

    h1 {
      margin-bottom: 10px;
      font-weight: 600;
      font-size: 1rem;
      color: #222;
    }

    form {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    input[type="text"] {
      flex-grow: 1;
      font-size: 0.9rem;
      padding: 0 10px;
      border-radius: 6px;
      border: 1.5px solid #ddd;
      min-height: 44px;
    }

    button {
      background-color: #0078D7;
      border: none;
      border-radius: 6px;
      color: white;
      padding: 0 16px;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      min-width: 80px;
      min-height: 44px;
    }

    button:hover,
    button:focus {
      background-color: #005a9e;
    }

    .info-box h2,
    .blog-box h2 {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 8px;
      color: #0078D7;
    }

    .info-box p {
      font-size: 0.85rem;
      color: #333;
      margin: 0;
      text-align: left;
    }

    /* --- ブログカード --- */
    .blog-card {
      background: #ffffff;
      border-radius: 8px;
      padding: 12px 14px;
      margin-top: 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
      cursor: pointer;
      text-align: left;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }

    .blog-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.16);
    }

    .blog-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #333;
    }

    .blog-subtitle {
      font-size: 0.8rem;
      color: #555;
      margin-top: 4px;
    }

    /* --- ポップアップ --- */
    .popup-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(4px);
      justify-content: center;
      align-items: center;
      padding: 20px;
      z-index: 999;
    }

    .popup {
      background: white;
      width: 100%;
      max-width: 500px;
      max-height: 85vh;
      border-radius: 12px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.2);
      padding: 20px;
      overflow-y: auto;
      position: relative;
      animation: fadein 0.2s ease-out;
    }

    @keyframes fadein {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
    }

    .close-btn {
      position: absolute;
      top: 12px;
      right: 12px;
      background: #ddd;
      border: none;
      border-radius: 4px;
      padding: 4px 8px;
      cursor: pointer;
      font-weight: bold;
    }

    .close-btn:hover {
      background: #bbb;
    }

    @media (min-width: 768px) {
      .top-section {
        flex-direction: row;
        max-width: 900px;
        align-items: stretch;
      }

      .soica-img {
        max-width: 400px;
        flex: 1;
        margin: 0;
      }

      .container {
        flex: 1;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: none;
      }

      .balance-container,
      .info-box,
      .blog-box {
        max-width: 900px;
        font-size: 1.1rem;
      }
    }