:root{
  --bg:#f7f7f5;
  --surface:#ffffff;
  --text:#111111;
  --muted:#777777;
  --line:rgba(0,0,0,.08);
  --line-strong:rgba(0,0,0,.12);
  --shadow:0 8px 24px rgba(0,0,0,.06);
  --shadow-soft:0 4px 16px rgba(0,0,0,.04);
--accent:#111111;
--radius-card:18px;
--radius-btn:14px;
--radius-input:14px;
  --topbar-h:56px;
  --subtabs-h:44px;
  --footer-h:60px;
  --maxw:720px;

  --safe-top-ios: env(safe-area-inset-top, 0px);
  --safe-top-android-app: 0px;
  --app-safe-top: max(var(--safe-top-ios), var(--safe-top-android-app));
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);

  --safe-top-gap:8px;
  --topbar-total-h: calc(var(--topbar-h) + var(--app-safe-top) + var(--safe-top-gap));

  --font-ui:"Inter","Noto Sans JP",system-ui,-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;
  --font-logo:"Rubik","Inter","Noto Sans JP",system-ui,sans-serif;
}
a,
button{
  -webkit-tap-highlight-color: transparent;
}
a,
a:visited,
a:hover,
a:active{
  color:inherit;
  text-decoration:none;
}
/* =========================
   Subtabs
========================= */
.subtabs{
  position:fixed;
  top:var(--topbar-total-h);
  left:0;
  right:0;
  height:var(--subtabs-h);
  z-index:990;
  display:flex;
  justify-content:center;
  align-items:stretch;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}

.subtabs-inner{
  width:100%;
  max-width:var(--maxw);
  margin:0 auto;
  height:100%;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  padding:0 10px;
}

.seg{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:stretch;
}

.seg a,
.seg button{
  flex:1;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  white-space:nowrap;
  background:transparent;
  border:none;
  border-radius:0;
  min-width:0;
  padding:0 0 1px;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  line-height:1;
}

.seg a.active,
.seg button.active{
  color:var(--text);
}

.seg-indicator{
  position:absolute;
  left:0;
  bottom:-1px;
  height:2px;
  width:calc(100% / 2);
  background:var(--accent);
  border-radius:999px;
  transform:translateX(calc(var(--seg-i, 0) * 100%));
  transition:transform .22s cubic-bezier(.2,.8,.2,1);
  pointer-events:none;
}
/* =========================
   App shell base
========================= */
.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;
  height:var(--topbar-total-h);
  padding-top:calc(var(--app-safe-top) + var(--safe-top-gap));
  background:var(--bg);
  border-bottom:none;
}

.topbar > .left-area,
.topbar > .center-area,
.topbar > .right-area{
  position:absolute;
  top:calc(var(--app-safe-top) + var(--safe-top-gap));
  height:var(--topbar-h);
  display:flex;
  align-items:center;
}

.topbar > .left-area{
  left:12px;
  width:44px;
  justify-content:center;
}

.topbar > .center-area{
  left:50%;
  transform:translateX(-50%);
  justify-content:center;
  min-width:140px;
  pointer-events:none;
}

.topbar > .center-area > *{
  pointer-events:auto;
}

.topbar > .right-area{
  right:12px;
  width:44px;
  justify-content:center;
}

.topbar-spacer{
  width:40px;
  height:40px;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  user-select:none;
  cursor:pointer;
}

.brand .text{
  font-family:var(--font-logo);
  font-size:23px;
  line-height:1;
  font-weight:800;
  letter-spacing:-0.02em;
  color:var(--text);
}

.icon-btn,
.icon-btn:visited,
.icon-btn:hover,
.icon-btn:active{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  background:transparent;
  border-radius:999px;
  position:relative;
  color:inherit;
  text-decoration:none;
  box-shadow:none;
  padding:0;
  -webkit-tap-highlight-color:transparent;
}

.icon-btn:active{
  transform:scale(.98);
}

.topbar-icon{
  width:20px;
  height:20px;
  object-fit:contain;
  display:block;
}

.notif-dot{
  position:absolute;
  top:6px;
  right:6px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#ff3b30;
  border:2px solid #ffffff;
  box-sizing:border-box;
}

/* =========================
   Bottom nav
========================= */
.bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:1000;
  padding-bottom:var(--app-safe-bottom);
  background:#ffffff;
  border-top:1px solid var(--line);
}

.dock{
  width:100%;
  max-width:var(--maxw);
  margin:0 auto;
  padding:0;
}

.dock-inner{
  height:var(--footer-h);
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0;
  padding:0 18px;
}

.dock-btn,
.dock-btn:visited,
.dock-btn:hover,
.dock-btn:active{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
  -webkit-tap-highlight-color:transparent;
  flex:0 0 44px;
}

.dock-btn:active{
  transform:scale(.97);
}

.dock-ico{
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
}

.dock-post,
.dock-post:visited,
.dock-post:hover,
.dock-post:active{
  width:56px;
  height:56px;
  border-radius:999px;
  background:#111111;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  margin-top:-12px;
  flex:0 0 56px;
  -webkit-tap-highlight-color:transparent;
}

.dock-post:active{
  transform:scale(.97);
}

.dock-post-ico{
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
  filter:brightness(0) invert(1);
}

/* =========================
   Generic page helpers
========================= */
.page-with-shell{
  min-height:100dvh;
  padding-top:calc(var(--topbar-total-h) + 14px);
  padding-bottom:calc(var(--footer-h) + 24px + var(--app-safe-bottom));
  background:var(--bg);
}

.page-with-shell.has-subtabs{
  padding-top:calc(var(--topbar-total-h) + var(--subtabs-h));
}

.shell-safe-bottom{
  padding-bottom:calc(var(--footer-h) + 24px + var(--app-safe-bottom));
}

/* =========================
   Hover
========================= */
@media (hover:hover) and (pointer:fine){
  .icon-btn:hover,
  .dock-btn:hover{
    background:rgba(0,0,0,.03);
  }

  .dock-post:hover{
    opacity:.96;
  }
}

/* =========================
   Responsive
========================= */
@media (max-width:640px){
  :root{
    --topbar-h:56px;
    --footer-h:60px;
    --safe-top-gap:8px;
  }

  .brand .text{
    font-size:22px;
  }

  .dock-inner{
    padding:0 16px;
  }

  .dock-post{
    width:54px;
    height:54px;
    flex-basis:54px;
    margin-top:-11px;
  }

  .dock-post-ico{
    width:23px;
    height:23px;
  }
}
html, body, button, input, textarea, select{
  font-family:var(--font-ui);
}

body{
  background:var(--bg);
  color:var(--text);
}

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow);
}

.btn-primary{
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:var(--radius-btn);
  min-height:44px;
  padding:0 16px;
  font-weight:700;
}

.btn-secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line-strong);
  border-radius:var(--radius-btn);
  min-height:44px;
  padding:0 16px;
  font-weight:700;
}

.input,
textarea,
select{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:var(--radius-input);
  box-shadow:none;
}

.page-shell{
  width:100%;
  max-width:var(--maxw);
  margin:0 auto;
}

.section-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
}
img{
  max-width:100%;
  height:auto;
}

video{
  max-width:100%;
}

.hidden{
  display:none !important;
}
.bottom-nav .dock-btn,
.bottom-nav .dock-post{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  cursor:pointer;
}