/* PANE Member — สไตล์เรียบ ขาวดำ ตามเว็บหลัก paneshoes.com
   ไม่ดึงไฟล์จากภายนอกเลย (จีนเปิดได้ปกติ) */

:root {
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --muted: #8a8a8a;
  --line: #e4e4e4;
  --paper: #ffffff;
  --sand: #f6f5f3;
  --accent: #0082ca;
  --danger: #b62029;
  --ok: #108474;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .06), 0 8px 24px rgba(17, 17, 17, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Sarabun",
               "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 20;
}
.topbar img { height: 18px; width: auto; }
.topbar .title { font-weight: 600; font-size: 15px; letter-spacing: .01em; }

.lang { display: flex; gap: 2px; }
.lang a {
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 4px 7px; border-radius: 8px; min-width: 32px; text-align: center;
}
.lang a.on { background: var(--ink); color: #fff; }

.content { flex: 1; padding: 16px; padding-bottom: 96px; }
.content.flush { padding-left: 0; padding-right: 0; }

h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 24px 0 10px; }
p { margin: 0 0 12px; color: var(--ink-soft); }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card.flat { box-shadow: none; }

/* บัตรสมาชิก */
.membercard {
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.membercard .tier {
  display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 4px 10px; margin-bottom: 14px;
}
.membercard .name { font-size: 20px; font-weight: 600; }
.membercard .code { font-size: 12px; color: rgba(255,255,255,.65); letter-spacing: .08em; margin-top: 2px; }
.membercard .pts { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.membercard .pts strong { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.membercard .pts span { font-size: 13px; color: rgba(255,255,255,.7); }

.qrbox { background: #fff; border-radius: 12px; padding: 12px; display: flex; justify-content: center; margin-top: 16px; }
.qrbox svg, .qrbox img { width: 100%; max-width: 190px; height: auto; display: block; }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress > i { display: block; height: 100%; background: var(--ink); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row + .row { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 2px; }

.chip {
  display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--sand); color: var(--ink-soft);
}
.chip.warn { background: #fdf2e7; color: #a15c15; }
.chip.ok { background: #e8f5f1; color: var(--ok); }
.chip.bad { background: #fdecec; color: var(--danger); }

.btn {
  display: block; width: 100%; text-align: center; padding: 14px 18px; min-height: 48px;
  background: var(--ink); color: #fff; border: 0; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:disabled { background: var(--muted); cursor: not-allowed; }
.btn.secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn.danger { background: var(--paper); color: var(--danger); border: 1px solid var(--danger); }
.btn + .btn { margin-top: 10px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=email], input[type=date], select, textarea {
  width: 100%; padding: 13px 14px; min-height: 48px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.otp input { text-align: center; letter-spacing: .5em; font-size: 22px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.check label { margin: 0; font-weight: 500; font-size: 14px; }

.error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.notice { background: var(--sand); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-soft); }
.notice.demo { background: #fff8e6; color: #8a6413; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.tabs a {
  font-size: 13px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap;
}
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.list li:last-child { border-bottom: 0; }
.amount { font-weight: 600; white-space: nowrap; }
.amount.plus { color: var(--ok); }
.amount.minus { color: var(--ink-soft); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reward { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: block; }
.reward .ph { aspect-ratio: 4/3; background: var(--sand); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.reward .body { padding: 10px 12px 12px; }
.reward .nm { font-size: 14px; font-weight: 600; line-height: 1.35; }
.reward .cost { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }

.nav {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto;
  background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
}
.nav a {
  text-decoration: none; color: var(--muted); font-size: 11px; text-align: center;
  padding: 6px 2px; min-height: 48px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav a.on { color: var(--ink); font-weight: 600; }
.nav svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.skeleton { background: linear-gradient(90deg, #eee, #f6f6f6, #eee); border-radius: 8px; height: 14px; }
