/* 1letter · khung chung của các bảng (radio, cà phê, bạn Nai, nơi hỗ trợ, máy bay giấy…), cùng kiểu với khung chat Reco (reco.css).
   Nạp SAU phong.css. Chỉ đổi phần khung: nền, thanh tiêu đề, nút đóng/quay lại, nút bấm, ô nhập, chữ.
   Chữ viết tay chỉ giữ cho nội dung lá thư (.sheet), không dùng trong các bảng. */
.card{--k-bg:#FFFFFF;--k-soft:#F6F4F0;--k-line:#E7E2DA;--k-text:#1E1B18;--k-muted:#6B645B;--k-faint:#948C81;
  --k-accent:#2F5D50;--k-accent-ink:#FFFFFF;--k-accent-soft:#E8F1EC;
  background:var(--k-bg);color:var(--k-text);font-family:var(--ui);font-size:16px;line-height:1.55;
  border-radius:18px;padding:0 22px 22px;box-shadow:0 24px 64px -24px rgba(20,14,8,.55),0 0 0 1px rgba(0,0,0,.04)}
.card.wide{padding:0 28px 24px}
.card.gamec{padding:0 20px 18px}
.card.has-back,.card.gamec.has-back{padding-top:0}

/* thanh tiêu đề: tiêu đề đầu mỗi bảng thành một thanh có đường kẻ dưới, giống đầu khung chat */
.card section > h2:first-child,.card section > .about-top:first-child,.card section > .ghead:first-child{
  position:sticky;top:0;z-index:3;background:var(--k-bg);margin:0 -22px 16px;padding:17px 64px 15px 22px;border-bottom:1px solid var(--k-line)}
.card.wide section > h2:first-child,.card.wide section > .about-top:first-child{margin-left:-28px;margin-right:-28px;padding-left:28px}
.card.gamec section > .ghead:first-child,.card.gamec section > h2:first-child{margin-left:-20px;margin-right:-20px;padding-left:20px}
.card.has-back section > h2:first-child,.card.has-back section > .ghead:first-child,.card.has-back section > .about-top:first-child{padding-left:116px}
.card section > .about-top:first-child h2{margin:0}
.card h2,.card h2.ui,.card .about-top h2{font-family:var(--ui);font-weight:600;font-size:18px;line-height:1.3;letter-spacing:-.005em;color:var(--k-text);margin:0 0 6px}
.card section > h2:first-child{margin-bottom:16px}
.card h3,.card h3.sub{font-family:var(--ui);font-weight:600;font-size:15px;letter-spacing:0;margin:20px 0 6px;color:var(--k-text)}
.card .q{font-family:var(--ui);font-weight:500;font-size:17px;line-height:1.45;color:var(--k-text)}
.card p,.card .lead{font-size:15.5px;line-height:1.6}
.card .lead{color:var(--k-muted);margin:0 0 16px}
.card small{color:var(--k-faint)}
.card a{color:var(--k-accent)}

/* nút đóng và quay lại: tròn, nền nhạt khi rê chuột, nằm trên thanh tiêu đề */
.card .x{position:absolute;top:10px;right:10px;z-index:4;width:38px;height:38px;min-height:0;padding:0;border:0;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--k-muted);box-shadow:none}
.card .x:hover{background:var(--k-soft);color:var(--k-text)}
.card .x svg{width:18px;height:18px}
.card .back{z-index:4;left:12px;top:12px;height:34px;border-radius:10px;font-family:var(--ui);font-size:14px;color:var(--k-muted)}
.card .back:hover{background:var(--k-soft);color:var(--k-text)}

/* nút bấm */
.card .btn{min-height:42px;padding:0 16px;border-radius:12px;font-family:var(--ui);font-size:15px;font-weight:500;background:var(--k-bg);color:var(--k-text);box-shadow:none}
.card .btn:not(.primary){border:1px solid var(--k-line)}
.card .btn:not(.primary):hover{background:var(--k-soft)}
.card .btn.primary{background:var(--k-accent);color:var(--k-accent-ink);border:1px solid var(--k-accent)}
.card .btn.primary:hover{filter:brightness(1.08)}

/* ô nhập: chữ gọn như khung chat (chữ viết tay chỉ dành cho lá thư) */
.card textarea,.card input[type="text"],.card input[type="email"],.card input:not([type]),.card select{font-family:var(--ui);font-size:15.5px;color:var(--k-text);
  background:var(--k-bg);border:1px solid var(--k-line);border-radius:12px}
.card textarea{min-height:120px;padding:12px 14px;line-height:1.55}
.card textarea::placeholder,.card input::placeholder{color:var(--k-faint)}
.card textarea:focus,.card input:focus,.card select:focus{border-color:var(--k-accent);outline:0;box-shadow:0 0 0 3px var(--k-accent-soft)}
.card :focus-visible{outline:2px solid var(--k-accent);outline-offset:2px}
.card input[type="range"]{accent-color:var(--k-accent)}

/* lá thư: chỉ đổi nút đóng cho cùng kiểu; nội dung thư giữ nguyên chữ viết tay */
#letterLayer .close{width:42px;height:42px;border-radius:12px;background:rgba(255,255,255,.94);color:#1E1B18;box-shadow:0 6px 20px -8px rgba(0,0,0,.45)}
#letterLayer .close:hover{background:#fff}

@media (max-width: 600px){
  /* chữ ô nhập ≥ 16px: iPhone không tự phóng to trang khi bấm vào ô nhập */
  .card textarea,.card input[type="text"],.card input[type="email"],.card input:not([type]),.card select,textarea,input[type="text"]{font-size:16px !important}
}
@media (max-width: 560px){
  .card{padding:0 16px 18px;border-radius:16px}
  .card section > h2:first-child,.card section > .about-top:first-child,.card section > .ghead:first-child{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:56px}
  .card.has-back section > h2:first-child,.card.has-back section > .ghead:first-child,.card.has-back section > .about-top:first-child{padding-left:108px}
}

/* Góc nhỏ mua sắm (thẻ rộng trên màn hình ngang): phong.css đặt lại padding cho .card.shopw, đưa về khung chung để thanh tiêu đề sát mép */
@media (orientation:landscape) and (min-width:820px){
  .card.shopw,.card.shopw.has-back{padding:0 28px 20px}
  .card.shopw section > h2:first-child{margin-left:-28px;margin-right:-28px;padding-left:28px}
  .card.shopw.has-back section > h2:first-child{padding-left:116px}
}
@media (orientation:landscape) and (min-width:820px) and (max-height:760px){
  .card.shopw,.card.shopw.has-back{padding:0 24px 14px}
  .card.shopw section > h2:first-child{margin-left:-24px;margin-right:-24px;padding-left:24px;font-size:18px}
}
.card .shop-media{border-color:var(--k-line)}
.card.shopw .shop-media{border-right-color:var(--k-line)}
