  :root {
      --primary-color: #d4af37;
      --secondary-color: #f8f5f0;
      --accent-color: #e8b4cb;
      --text-dark: #2c2c2c;
      --text-light: #666;
      --success-color: #28a745;
  }

  * {
      font-family: "Kanit", sans-serif;
  }

  body {
     font-family: "Kanit", sans-serif;
      background: #fdf6f0;
      margin: 0;
      padding: 0;
      margin-top:70px;
      background-color: #f5f0e6;
  }

  .box-nav {
    background-color:#d4af37;
    background-image: url('../images/bg-header2.png');
    background-size: cover;
    color: #192f59;
    padding-top: 10px;
    text-align: center;
    margin-bottom: 2rem;
  }

  .control-btn {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px 5px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;

        align-items: center;
        justify-content: center;
        gap: 5px;
        font-size: 0.9rem;
    }

    .control-btn:hover {
        background: #b8941f;
        transform: translateY(-1px);
    }

    .control-btn:active {
        transform: translateY(1px);
    }


  #loading {
      text-align: center;
      padding: 20px;
      color: #999;
      display: none;
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .wish-container {
      max-width: 480px;
      margin: 0 auto;
      padding: 10px;
  }

  /* orginal css */
  .card-preview {
      position: relative;
      width: 100%;
      /* aspect-ratio: 4 / 3; /* รักษาสัดส่วนภาพ */
      aspect-ratio: 1076 / 1522;
      overflow: hidden;

      background: white;
      border-radius: 20px;
      padding: 0;
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
      margin: 2rem auto;
  }

  .card-content {

      position: absolute;
      inset: 0;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      justify-content: flex-start;
      padding: 15px;
      box-sizing: border-box;
      width: 100%;
      height: 100%;

      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(1px);
      box-sizing: border-box;
      padding-top: 50px;

  }

  .card-name {
      font-size: clamp(1.2rem, 4vw, 1.8rem);
      font-weight: 700;
      color: var(--primary-color);
      margin-bottom: 0.5rem;
      text-shadow: 1px 1px 2px rgba(255, 255, 255, 1);
      text-align: center;
      line-height: 1.2;
  }

  .card-message {
      font-style: italic;
      color: var(--text-dark);
      margin-bottom: 0.8rem;
      line-height: 1.3;
      max-width: 90%;
      min-height: 50%;
      max-height: 50%;
      background: rgba(255, 255, 255, 0.8);
      padding: 0.4rem 0.8rem;
      border-radius: 10px;
      backdrop-filter: blur(5px);
      font-size: clamp(0.8rem, 3vw, 1rem);
      text-align: center;
      word-break: break-word;
      overflow-wrap: break-word;
      hyphens: auto;
      opacity: 0.8;
  }

  .card-side {

      color: var(--text-light);
      font-size: clamp(0.7rem, 2.5vw, 0.9rem);
      background: rgba(255, 255, 255, 0.9);
      padding: 0.3rem 0.6rem;
      border-radius: 15px;
      backdrop-filter: blur(5px);
      white-space: nowrap;
      opacity: 0.8;
      position: absolute;
      bottom: 38px;
  }

  .card-create {
      margin-top: 0.5rem;
      font-size: 0.75rem;
      color: #999;
      position: absolute;
      bottom: 10px;
      background: rgba(255, 255, 255, 0.9);
      padding: 3px 5px;
       border-radius: 10px;
        opacity: 0.7;
  }

  .card-template-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      z-index: 1;
  }

  .card-user-image {
      width: 150px;
      height: 150px;
      min-width: 150px;
      min-height: 150px;
      border-radius: 50%;
      margin: 0 auto 1rem;
      border: 3px solid var(--primary-color);
      display: block;
      overflow: hidden;
      position: relative;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      flex-shrink: 0;
  }

  .card-user-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: absolute;
      top: 0;
      left: 0;
      transform-origin: center center;
  }


  .card-user-image {
      width: 150px;
      height: 150px;
      min-width: 150px;
      min-height: 150px;
      margin-bottom: 0.6rem;
  }

  .card-name {
      margin-bottom: 0.4rem;
  }

  .card-message {
      margin-bottom: 0.6rem;
      padding: 25px 10px 10px 10px;
      
      margin-top: 20px;
      width: 100%;
  }

  @media (max-width: 480px) {

      .card-content {
          padding: 10px;
      }

      .card-user-image {
          width: 110px;
          height: 110px;
          min-width: 110px;
          min-height: 110px;
          margin-bottom: 0.6rem;
      }

      .card-message {
          line-height: 1.2;
          margin-top: 20px;
          margin-bottom: 0.5rem;
          width:100%;
      }
  }