/* 冰藍 WOS 兌換清單 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root { --fs: 1; }
body.f-m   { --fs: 1.13; }
body.f-l   { --fs: 1.42; }
body.f-xxl { --fs: 2.13; }

body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  background: linear-gradient(180deg, #e8f4fd 0%, #f4f9fe 240px);
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
  color: #1c2b3a;
  -webkit-text-size-adjust: 100%;
}

.topbar {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: #fff;
  padding: calc(14px * var(--fs)) 16px 12px;
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.topbar h1 { font-size: calc(20px * var(--fs)); font-weight: 700; }
.topbar .sub { font-size: calc(12px * var(--fs)); opacity: .85; margin-top: calc(4px * var(--fs)); }
.aa-btn {
  flex: 0 0 auto;
  background: rgba(255,255,255,.22); color: #fff; border: none;
  border-radius: 10px; padding: calc(6px * var(--fs)) calc(12px * var(--fs));
  font-size: calc(15px * var(--fs)); font-weight: 700;
}

main { max-width: 560px; margin: 0 auto; padding: calc(14px * var(--fs)) 14px calc(40px * var(--fs)); }

.card {
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 10px rgba(25,118,210,.08);
  padding: calc(16px * var(--fs));
  margin-bottom: calc(14px * var(--fs));
}
.card h2 { font-size: calc(17px * var(--fs)); margin-bottom: calc(12px * var(--fs)); }
.cnt { color: #1976d2; font-size: calc(14px * var(--fs)); font-weight: 600; }

label {
  display: block;
  font-size: calc(13px * var(--fs)); font-weight: 600; color: #47617a;
  margin-bottom: calc(10px * var(--fs));
}
label input {
  display: block; width: 100%;
  font-size: 16px; /* iOS 聚焦防縮放 */
  padding: 11px 12px; margin-top: calc(4px * var(--fs));
  border: 1.5px solid #cfe3f5; border-radius: 12px;
  background: #f8fbfe; color: #1c2b3a;
}
label input:focus { outline: none; border-color: #42a5f5; background: #fff; }
.hint { font-weight: 400; color: #8aa2b8; }
.row2 { display: flex; gap: 10px; }
.row2 label { flex: 1; min-width: 0; }

button.primary {
  width: 100%; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #1976d2, #42a5f5); color: #fff;
  font-size: calc(16px * var(--fs)); font-weight: 700;
  padding: calc(13px * var(--fs)); margin-top: calc(2px * var(--fs));
}
button.primary:active { opacity: .85; }
button.ghost, button.danger {
  border: none; border-radius: 12px;
  font-size: calc(15px * var(--fs)); font-weight: 700;
  padding: calc(12px * var(--fs)); flex: 1;
}
button.ghost { background: #eef4fa; color: #47617a; }
button.danger { background: #e53935; color: #fff; }

/* 名單 */
.list { display: flex; flex-direction: column; gap: calc(8px * var(--fs)); }
.entry {
  display: flex; align-items: center; gap: 10px;
  background: #f6fafd; border: 1px solid #e3eefa;
  border-radius: 12px; padding: calc(10px * var(--fs)) calc(12px * var(--fs));
}
.entry .avatar {
  flex: 0 0 auto; width: calc(38px * var(--fs)); height: calc(38px * var(--fs));
  border-radius: 50%; background: linear-gradient(135deg, #90caf9, #42a5f5);
  color: #fff; font-size: calc(15px * var(--fs)); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.entry .info { flex: 1; min-width: 0; }
.entry .nm {
  font-size: calc(15px * var(--fs)); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entry .meta { font-size: calc(12px * var(--fs)); color: #64809a; margin-top: 2px; }
.entry .meta b { color: #1976d2; }
.entry .del {
  flex: 0 0 auto; border: none; background: none;
  color: #b0bec5; font-size: calc(18px * var(--fs));
  padding: calc(6px * var(--fs)); line-height: 1;
}
.empty { text-align: center; color: #8aa2b8; font-size: calc(14px * var(--fs)); padding: calc(16px * var(--fs)); }
.foot { text-align: center; color: #8aa2b8; font-size: calc(12px * var(--fs)); }

/* overlay / sheet */
.overlay {
  position: fixed; inset: 0; z-index: 160;
  background: rgba(16,32,48,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: #fff; width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
}
.sheet h3 { font-size: calc(17px * var(--fs)); margin-bottom: calc(12px * var(--fs)); }
.del-who { font-size: calc(14px * var(--fs)); color: #47617a; margin-bottom: calc(10px * var(--fs)); }
.btn-row { display: flex; gap: 10px; margin-top: calc(4px * var(--fs)); }
.fs-row { display: flex; gap: 10px; margin-bottom: calc(12px * var(--fs)); }
.fs-opt {
  flex: 1; border: 1.5px solid #cfe3f5; background: #f8fbfe; color: #1c2b3a;
  border-radius: 12px; padding: calc(12px * 1); font-size: 15px; font-weight: 600;
}
.fs-opt.on { background: #1976d2; border-color: #1976d2; color: #fff; }

.hidden { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 200;
  background: rgba(28,43,58,.92); color: #fff;
  font-size: calc(14px * var(--fs));
  padding: 10px 18px; border-radius: 22px; max-width: 86vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.err { background: rgba(198,40,40,.95); }
