:root {
  --bg: #0f2a1d;
  --bg2: #163a29;
  --card: #1c4632;
  --fg: #f2f7f3;
  --sub: #a9c4b3;
  --accent: #ff5a36;
  --accent2: #ffb199;
  --line: #2c5c45;
  --danger: #ff7b7b;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  -webkit-text-size-adjust: 100%; }
a { color: inherit; }
.hidden { display: none !important; }

.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: rgba(15, 42, 29, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; text-decoration: none; font-size: 17px; }
.bar-link { text-decoration: none; color: var(--sub); font-size: 15px; padding: 4px 8px; }

main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1 { font-size: 24px; line-height: 1.4; margin: 12px 0 20px; }
h2 { font-size: 16px; margin: 0 0 8px; }

.card { background: var(--card); border-radius: 16px; padding: 18px; margin: 16px 0; }
.center { text-align: center; }
.label { font-size: 17px; font-weight: 700; }
.sub { color: var(--sub); font-size: 14px; line-height: 1.6; }
.note { color: var(--sub); font-size: 12px; text-align: center; margin: 4px 0 16px; }
.error { color: var(--danger); font-size: 14px; }

.big-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px;
  background: var(--accent); color: #fff; border-radius: 20px; font-size: 19px; font-weight: 700;
  cursor: pointer; box-shadow: 0 8px 24px rgba(255, 90, 54, .3); user-select: none; }
.big-btn:active { transform: scale(.98); }
#pick.disabled { opacity: .5; pointer-events: none; }
.sub-btn { display: block; margin-top: 12px; padding: 16px; text-align: center; border-radius: 16px;
  border: 1px solid var(--line); background: var(--bg2); font-size: 16px; font-weight: 700; cursor: pointer; }
.sub-btn:active { transform: scale(.98); }
.big-btn-icon { font-size: 36px; }

.tips ul { margin: 0; padding-left: 20px; color: var(--sub); font-size: 14px; line-height: 1.9; }
.tips b { color: var(--fg); }

.progress { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; margin-top: 10px; }
#upload-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.spinner { width: 44px; height: 44px; margin: 8px auto 16px; border: 4px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-icon { font-size: 40px; margin-bottom: 8px; }

video { width: 100%; max-height: 70vh; background: #000; border-radius: 16px; display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--card); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat-v { font-size: 24px; font-weight: 800; }
.stat-v small { font-size: 13px; font-weight: 600; color: var(--sub); margin-left: 2px; }
.stat-k { font-size: 12px; color: var(--sub); margin-top: 2px; }

.row { display: flex; gap: 10px; }
.btn { flex: 1; display: block; text-align: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--fg); font-size: 16px; font-weight: 700; text-decoration: none;
  cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.wide { margin-top: 12px; width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.link-btn { display: block; margin: 24px auto 0; background: none; border: none; color: var(--sub);
  font-size: 14px; text-decoration: underline; cursor: pointer; font-family: inherit; }
.link-btn.danger { color: var(--danger); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 10px;
  text-decoration: none; }
.item img, .item .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--bg2);
  flex: none; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 700; font-size: 17px; }
.item-sub { color: var(--sub); font-size: 13px; margin-top: 2px; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 10px; background: var(--bg2); color: var(--sub); flex: none; }

.bar-nav { display: flex; align-items: center; gap: 4px; }
#nav-account { display: flex; align-items: center; gap: 6px; }
#nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
#nav-avatar:not([src]) { display: none; }
.line-btn { display: block; width: 100%; margin-top: 16px; padding: 16px; border: none; border-radius: 14px;
  background: #06c755; color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; }
.line-btn:active { transform: scale(.98); }
.account { display: flex; align-items: center; gap: 14px; }
.account img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bg2); }
.danger-btn { color: var(--danger); margin-top: 8px; width: 100%; }
#view-boot { padding-top: 80px; }
.consent { color: var(--sub); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.consent a, .foot-links a { color: var(--sub); }
.foot-links { text-align: center; color: var(--sub); font-size: 12px; margin: 8px 0 0; }
.foot-links a { padding: 4px; }
.menu { padding: 4px 18px; }
.menu a { display: flex; justify-content: space-between; padding: 14px 0; text-decoration: none; font-size: 15px; }
.menu a + a { border-top: 1px solid var(--line); }
.menu a span { color: var(--sub); }
.terms-points ul { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.terms-points li { margin: 6px 0; }
.terms-links { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; font-size: 14px; }
.terms-links a { color: var(--accent2); padding: 4px 0; }
.agree { display: flex; gap: 12px; align-items: flex-start; padding: 4px 2px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.agree input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
#view-terms .sub.center { font-size: 12px; margin-top: 12px; }
