/* ⭐ 避免 JSON 載入前閃爍 */
.json-hide {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.json-show {
  opacity: 1;
}
:root {
  --bg:#f5f5f5;
  --card:#fff;
  --accent:#222;
  --pill-shadow:0 12px 20px rgba(0,0,0,0.15);
  --maxw:940px;
  --content-color:#444;

  --fz-body:16px;
  --fz-lead:16px;
  --fz-lead-m:15px;

  --fz-h1:18px;
  --fz-h1-m:16px;

  --fz-btn:17px;
  --fz-btn-m:15px;

  --fz-caption:16px;

  --fz-band-text:16px;
  --fz-band-text-m:14px;
}

*{box-sizing:border-box}
html,body{height:100%;margin:0}

body{
  font-family:'Noto Sans TC','Noto Sans KR',system-ui,-apple-system,"Segoe UI",Roboto,'Helvetica Neue',Arial;
  font-size:var(--fz-body);
  background:var(--bg);
  color:var(--accent);
  display:flex;
  justify-content:center;
  padding:40px 20px calc(90px + env(safe-area-inset-bottom));
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}

.wrap{
  width:100%;
  max-width:var(--maxw);
}
.hero {
  text-align: center;
  max-width: 760px;           /* ⭐ 文案邊界縮窄 */
  margin: 0 auto;
  padding: 0 14px 20px;
}
.profile{
  width:120px;
  height:120px;
  border-radius:50%;
  margin:0 auto 20px;
  overflow:hidden;
  border:6px solid rgba(255,255,255,0.15);
  box-shadow:0 6px 16px rgba(0,0,0,0.1);
}

.profile img{
  width:100%;
  height:100%;
  object-fit:cover;
}

h1{
  margin:8px 0 16px;
  font-size:var(--fz-h1);
  font-weight:700;
  color:#222;
}
.lead {
  font-size: var(--fz-lead);
  line-height: 1.65;           /* ⭐ 正常閱讀行距，不會太鬆 */
  color: var(--content-color);
  font-weight: 500;
  margin: 0 auto 24px;         /* ⭐ 整段與其他元素保持舒適距離 */
  text-align: left;            /* ⭐ 回到自然的排版方式 */
  max-width: 760px;            /* ⭐ 文案寬度更收斂，更高級 */
  white-space: pre-line;       /* ⭐ 自動套用 JSON 的 \n 換行 */
}
.hero .lead{
  text-align:left;
}

.big-pill{
  display:inline-block;
  margin:28px auto 0;
  padding:18px 28px;
  border-radius:50px;
  background:var(--card);
  box-shadow:var(--pill-shadow);
  min-width:520px;
  max-width:100%;
  font-weight:800;
  font-size:var(--fz-btn);
  color:#222;
  text-align:center;
  cursor:pointer;
  transition:0.2s ease;
}
.big-pill:hover{
  transform:scale(1.03);
  background:#fafafa;
}

.thumb-wrap{
  margin:36px auto 18px;
  max-width:820px;
  padding:0 10px;
}

.thumb{
  position:relative;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,0.1);
  background:#000;
}

.thumb img{
  width:100%;
  height:auto;
  display:block;
}

.thumb .caption{
  position:absolute;
  left:0;
  right:0;
  bottom:10px;
  padding:16px;
  font-weight:700;
  color:#fff;
  text-shadow:0 2px 8px rgba(0,0,0,0.5);
  font-size:var(--fz-caption);
  background:linear-gradient(180deg,transparent,rgba(0,0,0,0.55));
}

.band-zone{
  display:flex;
  justify-content:center;
}

.band-pill{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;
  margin:28px auto calc(100px + env(safe-area-inset-bottom));
  padding:16px 20px;
  border-radius:40px;
  background:var(--card);
  box-shadow:var(--pill-shadow);
  max-width:820px;
  width:calc(100% - 20px);
  font-size:var(--fz-btn);
  font-weight:800;
  cursor:pointer;
  animation:pulse 2s infinite;
}

.band-pill .text{
  font-size:var(--fz-band-text);
}

@keyframes pulse{
  0%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(43,179,74,0.35);
  }
  50%{
    transform:scale(1.03);
    box-shadow:0 0 20px 10px rgba(43,179,74,0.24);
  }
  100%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(43,179,74,0.35);
  }
}

@media(max-width:640px){
  .profile{
    width:96px;
    height:96px;
  }

  h1{
    font-size:var(--fz-h1-m);
    font-weight:700;
  }

  .lead{
    font-size:var(--fz-lead-m);
  }

  .big-pill{
    padding:14px 18px;
    font-size:var(--fz-btn-m);
    min-width:unset;
  }

  .band-pill{
    padding:14px 16px;
    margin:24px auto calc(120px + env(safe-area-inset-bottom));
    font-size:var(--fz-btn-m);
  }

  .band-pill .text{
    font-size:var(--fz-band-text-m);
  }
}
