:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --fill: #E3E3E9;
  --soft: #E9EEF8;
  --line: #E5E5EA;
  --text: #000000;
  --sub: #5C5C63;
  --sub2: #3A3A3F;
  --accent: #0062CC;
  --accent-ink: #004C9E;
  --trouble: #8A5A00;
  --trouble-soft: #F6E7C8;
  --navy: #0B1B33;
  --navy2: #13294A;
  --navy3: #1E3354;
  --gold: #F2C46B;
  --ok: #1E7D34;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --fill: #2C2C2E;
    --soft: #13294A;
    --line: #38383A;
    --text: #FFFFFF;
    --sub: #AEAEB2;
    --sub2: #D1D1D6;
    --accent: #4C9BFF;
    --accent-ink: #8BBEFF;
    --trouble: #F2C46B;
    --trouble-soft: #3A2C0F;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; font-size: 16px; color: var(--text); }
.num { font-variant-numeric: tabular-nums; }

#view { max-width: 600px; margin: 0 auto; padding: 4px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.top { display: flex; align-items: center; gap: 8px; height: 52px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; flex: 1; }
.iconbtn { width: 40px; height: 40px; border-radius: 20px; border: 0; background: var(--card); display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--accent); }
.nav { display: flex; align-items: center; height: 48px; gap: 4px; }
.nav a, .nav button { display: flex; align-items: center; gap: 2px; font-size: 17px; text-decoration: none; background: none; border: 0; color: var(--accent); padding: 0; min-height: 44px; }
.nav .title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; }
.nav .side { min-width: 72px; }

.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--fill); color: var(--sub); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }

.hero { background: var(--card); border-radius: 18px; padding: 18px; display: flex; gap: 14px; align-items: center; }
.hero h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 900; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 6px 0 0; font-size: 13px; color: var(--sub); }
.badge-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); margin-bottom: 6px; }
.badge-live::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: var(--ok); }

h2.sec { margin: 10px 4px 0; font-size: 20px; font-weight: 800; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
h2.sec a { font-size: 14px; font-weight: 600; text-decoration: none; }
.label { margin: 8px 4px 0; font-size: 13px; font-weight: 700; color: var(--sub); }
.note { margin: 0 4px; font-size: 12px; line-height: 1.6; color: var(--sub); }

.voices { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.voices::-webkit-scrollbar { display: none; }
.voice { flex: none; width: 230px; scroll-snap-align: start; background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.voice .when { font-size: 11px; font-weight: 700; color: var(--trouble); }
.voice b { font-size: 15px; line-height: 1.35; }
.voice span { font-size: 12px; color: var(--sub); line-height: 1.5; }

.seg { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg button { flex: 1; height: 34px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--card); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

.list { margin: 0; padding: 0; list-style: none; background: var(--card); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.rank { width: 24px; text-align: center; font-weight: 800; font-size: 15px; color: var(--sub); flex: none; }
.rank.top { color: var(--accent); font-size: 20px; }
.appicon { width: 48px; height: 48px; border-radius: 11px; flex: none; background: var(--fill); object-fit: cover; border: 0.5px solid var(--line); }
.appicon.lg { width: 72px; height: 72px; border-radius: 16px; }
.rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--text); }
.rowmain .name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--sub); flex-wrap: wrap; }
.dot { display: inline-flex; align-items: center; gap: 4px; }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: var(--c); }
.trouble { display: inline-flex; align-items: center; gap: 3px; color: var(--trouble); font-weight: 600; }
.votebtn { flex: none; min-width: 64px; height: 44px; border-radius: 22px; border: 0; background: var(--accent); color: #FFFFFF; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 0 10px; }
.votebtn small { font-size: 11px; font-weight: 600; opacity: 0.9; }
.votebtn[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.empty { padding: 20px; text-align: center; color: var(--sub); font-size: 14px; }

.card { background: var(--card); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.btn { height: 50px; border-radius: 14px; border: 0; background: var(--accent); color: #FFFFFF; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; }
.btn.black { background: #000000; color: #FFFFFF; }
.btn.plain { background: var(--soft); color: var(--accent); }
.btn.ghost { background: var(--card); color: var(--accent); }
.btn.amber { background: var(--trouble-soft); color: var(--trouble); }
.btn[disabled] { opacity: 0.5; }
.btns { display: flex; gap: 8px; }
.btns > * { flex: 1; }
.chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--accent); }
.chip.red { background: #FDECEA; color: #B42318; }
.chip.amber { background: var(--trouble-soft); color: var(--trouble); }

.apphead { display: flex; gap: 14px; align-items: center; }
.apphead h1 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; }
.apphead .dev { font-size: 13px; color: var(--sub); }
.big { font-size: 34px; font-weight: 800; line-height: 1; }
.meter { display: flex; gap: 4px; }
.meter i { flex: 1; height: 8px; border-radius: 4px; background: var(--fill); }
.meter i.on { background: var(--trouble); }
.tagbar { display: flex; flex-direction: column; gap: 4px; }
.tagbar .t { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.tagbar .bar > i { background: var(--trouble); }
.press { border-left: 3px solid var(--trouble); padding-left: 10px; font-size: 14px; }
.press a { font-size: 12px; }

.report { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.report:last-child { border-bottom: 0; }
.report .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); flex-wrap: wrap; }
.report .who b { color: var(--text); }
.report p { margin: 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; }
.thumbs img, .thumbs video { height: 120px; border-radius: 8px; background: var(--fill); flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.pick { display: flex; gap: 6px; }
.pick button { flex: 1; height: 48px; border-radius: 10px; border: 0; background: var(--bg); font-weight: 800; font-size: 18px; color: var(--sub); }
.pick button.filled { background: var(--trouble-soft); color: var(--trouble); }
.pick button[aria-checked="true"] { background: var(--trouble); color: #FFFFFF; }
.tagpick { display: flex; flex-direction: column; gap: 8px; }
.tagpick button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 2px; }
.tagpick button b { font-size: 15px; }
.tagpick button span { font-size: 12px; color: var(--sub); }
.tagpick button[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); }
textarea, .field { width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; line-height: 1.6; resize: none; background: var(--card); outline: none; }
.switchrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.switch { width: 51px; height: 31px; border-radius: 16px; border: 0; padding: 2px; background: #D1D1D6; display: flex; justify-content: flex-start; flex: none; }
.switch::after { content: ''; width: 27px; height: 27px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch[aria-checked="true"] { background: var(--ok); justify-content: flex-end; }
.media { display: flex; gap: 8px; flex-wrap: wrap; }
.media .m { position: relative; }
.media .m img, .media .m video { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.media .m button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 12px; border: 0; background: #000000; color: #FFFFFF; font-size: 14px; line-height: 1; }
.filebtn { flex: 1; height: 48px; border-radius: 12px; background: var(--card); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--accent); }
.filebtn input { display: none; }
.sticky { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }

.issue { background: var(--card); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 16px; }
.issue h3 { margin: 0; font-size: 17px; }
.issue p { margin: 0; font-size: 14px; color: var(--sub2); }
.issue .src { font-size: 12px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px 10px; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { width: 100%; max-width: 600px; background: var(--bg); border-radius: 18px 18px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 92vh; overflow-y: auto; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: #C7C7CC; margin: 0 auto 4px; }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 800; text-align: center; }
.sheet .lead { margin: 0; text-align: center; color: var(--sub); font-size: 14px; }
.sharecard { background: var(--navy); color: #FFFFFF; border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.sharecard .v { font-size: 30px; font-weight: 800; }
.sharecard small { color: #A9C3EA; font-size: 12px; }
.apple { background: #000000; color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .apple { background: #FFFFFF; color: #000000; } .btn.black { background: #FFFFFF; color: #000000; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(0,0,0,0.85); color: #FFFFFF; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); }
.foot { text-align: center; font-size: 12px; color: var(--sub); padding: 12px 0; }
.foot a { color: var(--sub); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
canvas.preview { width: 100%; border-radius: 12px; }
.btns > .btn { font-size: 15px; white-space: nowrap; }
.btns > [data-share] { flex: none; width: 56px; }
.voice { align-self: flex-start; }
