*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  background:#fff9f3;
  color:#262636;
}

/* Links */
a{
  color:#ff6b3d;
  text-decoration:none;
}
a:hover{
  text-decoration:underline;
}

/* Layout container */
.container{
  width:100%;
  max-width:980px;
  margin:0 auto;
  padding:0 16px;
}

/* Top bar - bright gradient header */
.topbar{
  background:linear-gradient(120deg,#ffb42c,#ff6b3d,#ff3d7a);
  color:#fff;
  padding:20px 0 24px;
  box-shadow:0 3px 14px rgba(0,0,0,0.18);
  position:relative;
  overflow:hidden;
}
.topbar::after{
  content:'';
  position:absolute;
  right:-60px;
  top:-40px;
  width:220px;
  height:220px;
  background:radial-gradient(circle at 30% 30%,rgba(255,255,255,0.55),transparent 60%);
  opacity:0.9;
}
.logo-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  position:relative;
  z-index:1;
}
.logo-img{
  height:40px;
  width:auto;
  border-radius:8px;
  box-shadow:0 4px 10px rgba(0,0,0,0.25);
}
.topbar h1{
  margin:0;
  font-size:22px;
  letter-spacing:1px;
}
.topbar-sub{
  margin-top:4px;
  font-size:13px;
  opacity:.95;
}

/* Cards */
.card{
  background:#ffffff;
  border-radius:14px;
  padding:20px 18px;
  box-shadow:0 4px 18px rgba(255,134,81,0.18);
  margin:18px 0;
  border:1px solid #ffe1c7;
}
.card.small{
  max-width:340px;
}
.card h2{
  margin-top:0;
  margin-bottom:8px;
  font-size:20px;
  color:#ff6b3d;
}
.card h3{
  margin-top:0;
  margin-bottom:8px;
  font-size:16px;
  color:#ff6b3d;
}
.card p{
  margin:4px 0 10px;
  line-height:1.7;
  font-size:14px;
}

/* Buttons */
.btn{
  display:inline-block;
  padding:10px 20px;
  border-radius:999px;
  background:#ff6b3d;
  color:#fff;
  font-size:14px;
  border:none;
  cursor:pointer;
  text-decoration:none;
  transition:background .18s, box-shadow .18s, transform .08s;
}
.btn:hover{
  background:#ff834f;
  box-shadow:0 4px 12px rgba(255,120,70,0.45);
  text-decoration:none;
}
.btn:active{
  transform:translateY(1px);
  box-shadow:0 2px 6px rgba(255,120,70,0.4);
}
.btn.muted{
  background:#ffe1c7;
  color:#77422b;
  box-shadow:none;
}
.btn.muted:hover{
  background:#ffd2ac;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select{
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #ffd0a8;
  font-size:14px;
  margin-top:4px;
  margin-bottom:10px;
  transition:border-color .15s, box-shadow .15s, background .15s;
  background:#fffdf9;
}
input:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:#ff8b50;
  box-shadow:0 0 0 2px rgba(255,139,80,0.25);
  background:#ffffff;
}

label{
  display:block;
  font-size:13px;
  color:#5a4a3a;
  margin-bottom:4px;
}

/* Notices */
.notice{
  padding:10px 12px;
  border-radius:10px;
  background:#fff4d8;
  border:1px solid #ffd68a;
  font-size:13px;
  margin-bottom:12px;
}

/* Feature icons row */
.feature-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.feature-item{
  text-align:center;
  padding:10px 6px;
}
.feature-item img{
  width:44px;
  height:44px;
  margin-bottom:4px;
}
.feature-title{
  font-size:13px;
  font-weight:600;
  margin-bottom:2px;
  color:#3b2c2a;
}
.feature-text{
  font-size:12px;
  color:#7a5a4a;
  line-height:1.5;
  margin:0;
}

/* Home ads - 2x2 grid */
.home-ads{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:8px;
}
.home-ad-item{
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* 這裡改成「不裁切」，只限制寬度，維持原比例 */
.home-ad-item img{
  width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:0 3px 12px rgba(0,0,0,0.16);
  object-fit:contain;
}

.home-ad-title{
  text-align:center;
  margin-top:4px;
  font-size:13px;
  color:#3b2c2a;
}
.home-ad-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:130px;
  border-radius:12px;
  border:1px dashed #ffc9a0;
  font-size:13px;
  color:#9a6b4a;
  background:#fff2e5;
}

/* Footer */
.foot{
  margin-top:24px;
  padding:18px 0 26px;
  font-size:12px;
  color:#956c4e;
  text-align:center;
}

/* Responsive tweaks */
@media (max-width:720px){
  .feature-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .logo-img{
    height:34px;
  }
  .topbar h1{
    font-size:18px;
  }
}

/* ============================
   廣告圖片比例框（改為「不裁切」版本）
   ============================ */

/* 4:3 廣告比例（首頁、會員頁上方） */
.ad-43{
  position:relative;
  width:100%;
  border-radius:12px;
  background:#ffffff;
  box-shadow:0 3px 12px rgba(0,0,0,0.12);
  padding:6px;              /* 留一點內距，像名片放在卡片裡 */
}
.ad-43 img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;        /* ✅ 不裁切，只縮放 */
}

/* 3:2 廣告比例（會員頁小廣告） */
.ad-32{
  position:relative;
  width:100%;
  border-radius:10px;
  background:#ffffff;
  box-shadow:0 2px 8px rgba(0,0,0,0.10);
  padding:4px;
}
.ad-32 img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;        /* ✅ 不裁切，只縮放 */
}
